Message ID | 20240131231120.12006-11-frederic@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-47354-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp93168dyc; Wed, 31 Jan 2024 15:37:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IFRCPBPFSTCKnutom1M3kPV7B4E3EuYE7l5lMhDCRwaMVbo6/8aMnlQCaU7nb8uUIcRF5vN X-Received: by 2002:a05:6a20:8813:b0:19e:30a6:fe29 with SMTP id c19-20020a056a20881300b0019e30a6fe29mr4061510pzf.31.1706744253892; Wed, 31 Jan 2024 15:37:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706744253; cv=pass; d=google.com; s=arc-20160816; b=spUhRlP6RFgPti+8w7xfGpMz2GsenLy6VJ8SRowCI+BOaR5RN1ZBRNK8SwGl6zFnLL xtBEYgQ4nigJrUFGpvpV4Ll2aua8b7w4msYn+AvdhrxnJw5r8UmxWJXW93PXcaNrYNMA zS5HAV5rau9RM/iCt2JO0SQ9q4LhqbdEMqvtxryWeuCZo8IP6XKom66DZ9Ad0tFJzfb4 tthhcfXUQaz5n8qIn1oF57fNXzbPS3b9bp59BTGR79Pa5tl5Dw/V6zmtC/ZCq+MLtqpm mTMmgej/ayE7LGaYqYEXzI4ENat0oZas7mk9+pw+vVHSC2livlVXPsfYXsnvdEjRAJkL 9C7w== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=cFSuVjv2FnCTnAbyXHWEfFPMC5xjEe1q4efox4MIC94=; fh=fioWudWJonTuqdWXgxgc7aKCh5Gu2ar35DezYnuu9b8=; b=EP4if2Hrr8lKnsRblXzhMkQtb+OSaM2D5gpVSbnrRONooozyr2Z56/76/HJOy0Np5S +ZFv6eqMJ9cPYUVqxVhQ7If8dfUN4XiY+XFhtS7gp20sTZLxfLimIyeVvdEnfHB9Z+b/ oTR/LVbl+0L41LDoxL+4M4ayAYNsYgj175qF2eSCH3DtWRhCG9IrILd9ng/RuQYxK8C2 dR+Ju/thrjjXUD0MSJCoM1LTsNbZZ/aXfsYlyDQak/tZXOohZ4YYVRKazah+ul+Gs5lc toScanjcYOA9gOeRUkT/t6gDdBxlWGwRFHNqqnRLAWMMzpi/R+nrI9mLrN/EF646PzWu TIhg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XXxcfO8+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47354-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47354-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCVQ2vfbWnOx2/UefcyBtZgn2XEvFAs30oDHuhSV4LcixvPXU9rjGAY4LCmJq+griFOyjeyz+/VPjJPayD+VoxCatAHdEw== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h14-20020a65638e000000b005d8b5aace83si8666474pgv.289.2024.01.31.15.37.33 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 15:37:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47354-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XXxcfO8+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47354-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47354-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id EA29F296A58 for <ouuuleilei@gmail.com>; Wed, 31 Jan 2024 23:30:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3658C13343E; Wed, 31 Jan 2024 23:11:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XXxcfO8+" 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 7F03B12BEBE for <linux-kernel@vger.kernel.org>; Wed, 31 Jan 2024 23:11:49 +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=1706742709; cv=none; b=M1KHCVTvN3VOtpUWV2hUHHG9Uy/InO00JQxGd/0QSx6BWsDQYNvfA5o11DcMSek8zynFe6LLmswsChmXsdRFEbLbDBdoVGf7t+GH8GVkKoEPnSPxWhQmg0LQza291iXZgJOsZO6d9TZbV5cZKrlWoXUZcFaTRRze9s+vkwbw23A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706742709; c=relaxed/simple; bh=yj/CebTCEK8vWtZdTKGdNz/nxnJEqwYwgzARrGP9DTU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FHun7Ee/QzOCmO49/XcfWnnlORdaVNL4qGXc1H9nb/E4PivXjeGgNQ0NscUzEBEKOuy1b+HqqsMNzcTZmyVZmhqshc9Yd5hIxFtHr5dpKEYpCDM3fPVYFGk0O+VL84L9KfVqBWg0kz/xhxr1UAhi3bieYWc6sfCaxh2dIQfNOyE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XXxcfO8+; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2CD82C433F1; Wed, 31 Jan 2024 23:11:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706742708; bh=yj/CebTCEK8vWtZdTKGdNz/nxnJEqwYwgzARrGP9DTU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XXxcfO8+OSxfeXXn/jfn6uK+epAT2LG5oixSOXkrlhT8llyCXH2uiHdGNQc/C6bTt d2c7eeqMOtd6yLGhjHg79Ysw5W2yMFWGtDSxcJLKyG+oJ/MsOIay0+LKCtjml31oG5 +t217wHeMRRDJmwR6Y1BTZT1QH5WPUuku8L2o8gVKPyW4QRJxjvaHJjBMOob0C2bee yZraAGTpac9N4aVl7Bf5n4fRHw7w8gijebTxxO+Bcdi9qSfOrbMjLx4wvqaur5OpCR CE1TNVugxbyoq+mozFcOFeMIOSqjwh3/mB2Vjf3HVrPTvOfvCA+7slVFeO1B/I3AH5 TlQpFnp7qRO4w== From: Frederic Weisbecker <frederic@kernel.org> To: LKML <linux-kernel@vger.kernel.org> Cc: Frederic Weisbecker <frederic@kernel.org>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@kernel.org>, Anna-Maria Behnsen <anna-maria@linutronix.de>, Peng Liu <liupeng17@lenovo.com>, Joel Fernandes <joel@joelfernandes.org> Subject: [PATCH 10/15] tick: Assume the tick can't be stopped in NOHZ_MODE_INACTIVE mode Date: Thu, 1 Feb 2024 00:11:15 +0100 Message-ID: <20240131231120.12006-11-frederic@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240131231120.12006-1-frederic@kernel.org> References: <20240131231120.12006-1-frederic@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789651062763701685 X-GMAIL-MSGID: 1789651062763701685 |
Series |
timers/nohz cleanups and hotplug reorganization
|
|
Commit Message
Frederic Weisbecker
Jan. 31, 2024, 11:11 p.m. UTC
The full-nohz update function checks if the nohz mode is active before proceeding. It considers one exception though: if the tick is already stopped even though the nohz mode is inactive, it still moves on in order to update/restart the tick if needed. However in order for the tick to be stopped, the nohz_mode has to be either NOHZ_MODE_LOWRES or NOHZ_MODE_HIGHRES. Therefore it doesn't make sense to test if the tick is stopped before verifying NOHZ_MODE_INACTIVE mode. Remove the needless related condition. Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> --- kernel/time/tick-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index a07a04bb9d27..0d0370d8111e 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -1043,7 +1043,7 @@ static void tick_nohz_full_update_tick(struct tick_sched *ts) if (!tick_nohz_full_cpu(smp_processor_id())) return; - if (!ts->tick_stopped && ts->nohz_mode == NOHZ_MODE_INACTIVE) + if (ts->nohz_mode == NOHZ_MODE_INACTIVE) return; __tick_nohz_full_update_tick(ts, ktime_get());