From patchwork Wed Jan 31 23:11:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 19765 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp106200dyc; Wed, 31 Jan 2024 16:07:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IGDAw004wEeiqk2dGJ/tG+jZJZLBk20+wsDaO5jmYR1L6uswUD/ZTNebSHC+PMGxVRsaEBX X-Received: by 2002:a05:6358:7e13:b0:175:67e3:cb28 with SMTP id o19-20020a0563587e1300b0017567e3cb28mr900889rwm.12.1706746044791; Wed, 31 Jan 2024 16:07:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706746044; cv=pass; d=google.com; s=arc-20160816; b=pPkrzP8UCW4HUpDItbznv/75p1wZ6q1xrUgKMWdfa2XishMRVLiXY09bSe+Rypexl5 vXptNbUzP3TUHDN1s/hDuNJJU4KgXkeGp06AEpzgMfebHUX8ZihlaDfGGr4Mx8EpvR0S lAyyGvfTRlxSIowOUHfebG6zcztC6/Bv4tMsnGoE5FcXNldRIultZk7ocXknCSzrLnxY ltMtzStSTSoyyhJ6u/7E0+tn6F73xjuAUcCZJ7+lEHjV2t1S7icrImPSHHDip0jaXSO1 gYAqT28kqm1JWwDjCRRhlRXzGPU+oGzlCUXkj8P29lGwoACX8iBEH42mvv8AYmcTEOrH 12vw== 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=e3gvk7pv4nrrGUa/8NMx7CXFi+dSIcdxZ+zg0pbDewc=; fh=qTV5gPokVvrzZsdA7gz3Z0oxPGbDkkZR1tMb3bRIUbU=; b=M9BliFL18cz5fhHOIHlwd7Dp+gAnjzx4SiVIeaCuFShff7N6wz5PEL63S8tUFMUJxt tb7Oi2FArqwS7+BCjFX1hnXsHQeerIjF+PefjcwiWLh4kGCtzcRVGXbWh4muThcEJYoE a61+qhwHYjk9gVZuJQwkedy9hrW6VMvPCmVQpn1Y7bda5vZi2ylxW6NamxtomUbIbrok rmp/wLxhoD9PQLiC16as+vmmZf/8kYJ1Y7VGbXSZquQiv4Xl/6drM3dVuPAnZFKpwKLJ jsIn0pfvPWK8mBKWAwYwQkPYQcVO95kagLjL3aZM6OecK4yoQvub8VGRH4VpGUIeV/UF 6k/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HJ0El5pK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47344-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47344-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCU8JsetdMqbXfqOiX1PNAh+/1sK6Xq4emLXFcyZuPXw9vShkqyiYveNXwK82nM/DjdLK5XhEU2K7xSvsWpzQaWNrm7++Q== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id k14-20020aa788ce000000b006ddc33df4e3si10743393pff.327.2024.01.31.16.07.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 16:07:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47344-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HJ0El5pK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47344-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47344-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 C383EB366AD for ; Wed, 31 Jan 2024 23:28:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0460147F4D; Wed, 31 Jan 2024 23:11:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HJ0El5pK" 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 64D633BB22 for ; Wed, 31 Jan 2024 23:11:26 +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=1706742686; cv=none; b=dPZXSRMzLOg+1zIbAuYsgUaIpMvDX6+8pkNmc3LxOWCyaGVwozv/rxQOLV1MdOILHCBt/rf7/XfGiWhN7nGEXz7B9NNExlVO5/2nmeGHUSbE+NAxbwpyKvryk/WqFJWbIgV+eDkgv/R8HihqSvSmmf0VdqaMGfFoz5Ue6ieUYRs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706742686; c=relaxed/simple; bh=8/cHDQ2a2ff4CLNkIPVLEkwBFQAl5xC0U6epddcvZBo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=aKVnl3GXB3MMUR/Oc7Iq3byG0BI8FWZg9dzR2AChdzIOYMZMhBn4uie425S1bvjxhaYTdQdKUWq5nN1tJa+juV6Ei0Ae8Ne3M31/IXaEOY5ni8YnBPGPzvsG32cjrcHuFZniEFBGBzGGR517L1iHaVisOPG8qSu3/emhvdOYpjs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HJ0El5pK; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A80EC433F1; Wed, 31 Jan 2024 23:11:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706742685; bh=8/cHDQ2a2ff4CLNkIPVLEkwBFQAl5xC0U6epddcvZBo=; h=From:To:Cc:Subject:Date:From; b=HJ0El5pKw470bTOmY0OecVaWlkNLoZ6MOX5saXGsH6DkJ0thfBpV8TFncM9+Rcv89 SkSyfez0QoCa6kcR0LjXzEP3yMA+dnLavDdXZw0bIvJOJ53wRBS4Nz5rC+F7vunAOd 3Cc2aBTdSJQgTckpjhIykBBi49l28oPVTKQxl6iro9vOnizhayzza55YScWlzoWmBY n8nmX1KXOdiaamM/5JZ3wKuFLsyevS7DX0G8qf/CbnncTnVDvnkCp2LgTsNzlMZH3d wnZl9W/9DBfuKs8SGOW4HrMgiTynv4DNlGfszPSPx4tu1npoo320zdV2nKIIyp4n2u t7ug9p++fMyaw== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Thomas Gleixner , Ingo Molnar , Anna-Maria Behnsen , Peng Liu , Joel Fernandes Subject: [PATCH 00/15 v2] timers/nohz cleanups and hotplug reorganization Date: Thu, 1 Feb 2024 00:11:05 +0100 Message-ID: <20240131231120.12006-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: 1789652940650146902 X-GMAIL-MSGID: 1789652940650146902 Hi, Here are some cleanups here and there and also some more rational tick related CPU hotplug code reorganization. Changes since v2: * Add some IS_ENABLED(CONFIG_HIGH_RES_TIMERS) to optimize code * Rename tick_nohz_highres_handler() to tick_nohz_handler() * Add Reviewed-by tags git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git timers/hotplug-v2 HEAD: 6921da4d7425bd33618bfec67fb2e564ea37b756 Thanks, Frederic --- Frederic Weisbecker (13): 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 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 | 295 +++++++++++++++++++++----------------------- kernel/time/tick-sched.h | 40 +++--- kernel/time/timer_list.c | 10 +- 10 files changed, 211 insertions(+), 200 deletions(-)