From patchwork Sun Feb 25 22:54:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 20937 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp1770203dyb; Sun, 25 Feb 2024 14:55:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWbzBGEWwL0LLWPXjf/Bdeh6piBji6z5Q7rgCg11kesdEJ0I2T317SuJhAUb3Gg7ZF2YlIiTTV7yMYTsRVMGO+c6ZILWQ== X-Google-Smtp-Source: AGHT+IG44U42c/4yAS/3Toy9B+ISf1H8dhwZWs91R6YaViTwBVHT8Cs3E7G2+Tvqyk07B5RnrLtE X-Received: by 2002:a05:6358:590a:b0:17b:56f5:e with SMTP id g10-20020a056358590a00b0017b56f5000emr7154800rwf.0.1708901740621; Sun, 25 Feb 2024 14:55:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708901740; cv=pass; d=google.com; s=arc-20160816; b=b5ufiqbcAM25Geh+qVdfShggR4gbVuCmT/g6DTTw5Pxm3IiqKt8BbmVZIPdOqLvss2 7/mRFCq4OUxgqKBKgX6ZeJhD9pHaUNYNnj11RXnHPgl/wyK8d9pnKRUlrULPm0+nVlmj Cyq3tAnxV6geicMmVZobiEA3m/ImWcdYtAYk1BNv/T9e3TgaHHnTHWaY0VhgRBv3tM+8 mhXD3JsDG1VgUXQii/a8i7lnraWcIQ0L4mtgAFleNwdXTP47VdkQ4dC4kb9OC8FIGYK5 8/5Z4xn4Dl46oCaPYvjNGQHb2grdoyhs5vUUuawhwSBki5Dz/RkqRC8p7yhXADraYKRl XfsQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=XG1PV0nigCnNW7GGLEcvKQJOpXseyrEPuIqAbLukxog=; fh=9AYDxpIF3ws21qQDvjghHSFUuXpDdpq2Zh/SbnasVRo=; b=ysAhnvi/qxtoi3H/cINHuXHgUAHaPY2VMWXBNGAfJSwJRwas42Oq+Rg82+Fod49/rG vyTt+vnBybUHkuFI6hnldEF3dFjdTM2kF2jLEfCuVusgUHVWWJsOO+wGqEqaCB+69UOh ypBVTYIFTAmX8W3ymDPltFfwxky9r/bJL6RKnQJy78/wj3ZRxbT59LdjnwvP7S0ybPF4 ETLtp5itH21k6Ri3pmipyND+S7+UF5buVJDFK2xyZyY86zMo+4n+58dnImDrsr/C3I0u lWropbzaw0rBnx7q3wWkgFgNdCI4hs+/IIBajkze6//ys1mdsZP+xjV3Atn9WwbC+nxV zSGw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D0Ko0lot; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80327-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80327-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id h22-20020a633856000000b005dc0b3095b3si2665998pgn.283.2024.02.25.14.55.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 14:55:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80327-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D0Ko0lot; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80327-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80327-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D6B21B21057 for ; Sun, 25 Feb 2024 22:55:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C7C21BDCE; Sun, 25 Feb 2024 22:55:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="D0Ko0lot" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5DCC01B947 for ; Sun, 25 Feb 2024 22:55:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708901714; cv=none; b=KgER/X/sqhGnysh1Lga0mNHrRwmMMWgKhtCWe98IVwmoX0CJKQzkMonoEsQYw7h1fTqT4SSMq/rc+hApJv1Eu0A/CljRsUoOLKzxSaxkwTqP/3Pc4uPySzdmtBhTMRAbd+1lR4wCQDrlFK4zLxg2p/HPTY7Utl6axFsWXtvOi2w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708901714; c=relaxed/simple; bh=xN5KqWF8+jxp1fVahcYZnWcHbDF58rr/ulFRlSkcI94=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=kMEcobsdD8zJoLirACKGmp1HP26Gd6Y1MlDalvbICd3psjrfKE35aK20euk0O2qhGVjm1c2m8F/OuOmRkw8MwaPvAiP7/nrSFdHIG497iCQ4IaeHy5vH1EcwlyvbcfxTQVi37cDWThO9fyelrbnYUOUvr2Y/dRPlbzbI3oO0TrM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=D0Ko0lot; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2AB25C433F1; Sun, 25 Feb 2024 22:55:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708901713; bh=xN5KqWF8+jxp1fVahcYZnWcHbDF58rr/ulFRlSkcI94=; h=From:To:Cc:Subject:Date:From; b=D0Ko0lotlxlU6WvQvSIeVlDm9SZdRG2grGjk9HXI239//mxgzIU/su6dlH3BuNiFN FE/SV4/QGTMqW0X0Euj9foNU4e3LuS0V8BmETDsVH4hpJmqVecaUF45Bx2hhXUNu9w 22oPcaH8bQG1+6UHof8fhW1mFNDhXC+gF5OLR2PUxNtqORosv5BhmcKzd3PjpZvcN8 KwhJPpae2tWxbajFXenM+KDGtEaTOW9Fnw6iqh93psANqWfVM87TC+OVDqrdh7Ytiu BO5x/R8mcP9FGgk10F8ueuoY00FoW0g6W5Wb5Eefq+I87XX5bPCt3oEClX4OowMMAv h4sD/gu30w1Kg== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Thomas Gleixner , Ingo Molnar , Anna-Maria Behnsen , Peng Liu , Joel Fernandes Subject: [PATCH 00/16 v3] timers/nohz cleanups and hotplug reorganization Date: Sun, 25 Feb 2024 23:54:52 +0100 Message-ID: <20240225225508.11587-1-frederic@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791913351780962899 X-GMAIL-MSGID: 1791913351780962899 Hi, Here are some cleanups here and there and also some more rational tick related CPU hotplug code reorganization. Changes since v3: * Rebase against latest tip:timers/core (after tmigr introduction) * New patch "timers: Assert no next dyntick timer look-up while CPU" git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git timers/hotplug-v3 HEAD: a0d432ebab0b7f75e03049d5d2baabff7f39ee1d Frederic Weisbecker (14): tick: Remove useless oneshot ifdeffery tick: Use IS_ENABLED() whenever possible tick: s/tick_nohz_stop_sched_tick/tick_nohz_full_stop_tick tick: No need to clear ts->next_tick again tick: Start centralizing tick related CPU hotplug operations tick: Move tick cancellation up to CPUHP_AP_TICK_DYING tick: Move broadcast cancellation up to CPUHP_AP_TICK_DYING tick: Assume the tick can't be stopped in NOHZ_MODE_INACTIVE mode tick: Move got_idle_tick away from common flags tick: Move individual bit features to debuggable mask accesses tick: Split nohz and highres features from nohz_mode tick: Shut down low-res tick from dying CPU tick: Assume timekeeping is correctly handed over upon last offline idle call timers: Assert no next dyntick timer look-up while CPU is offline Peng Liu (2): tick/nohz: Remove duplicate between tick_nohz_switch_to_nohz() and tick_setup_sched_timer() tick/nohz: Remove duplicate between lowres and highres handlers include/linux/cpuhotplug.h | 1 + include/linux/tick.h | 16 +- kernel/cpu.c | 11 +- kernel/sched/idle.c | 1 - kernel/time/hrtimer.c | 4 +- kernel/time/tick-common.c | 31 ++-- kernel/time/tick-internal.h | 2 + kernel/time/tick-sched.c | 297 +++++++++++++++++------------------- kernel/time/tick-sched.h | 40 ++--- kernel/time/timer.c | 6 +- kernel/time/timer_list.c | 10 +- 11 files changed, 215 insertions(+), 204 deletions(-)