Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1009894rbb; Sun, 25 Feb 2024 15:06:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWgEU3rBubgAqkprymvbiB2u4GYjOBwn9cTbJJOVUWcSxF5y4KtLnECqmoHtGllrgSminhC8O0VWnqVvaWjgCJVZow4s2CN79JyO2Se1g== X-Google-Smtp-Source: AGHT+IF1cjNT1PhdJRyewZp6LQxEV8RpItoVSHZNq0lOsJ27VG1OYXU9hiQUfxpMO5EKKuMOQD4T X-Received: by 2002:aa7:de15:0:b0:565:c814:d891 with SMTP id h21-20020aa7de15000000b00565c814d891mr1765026edv.0.1708902405599; Sun, 25 Feb 2024 15:06:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708902405; cv=pass; d=google.com; s=arc-20160816; b=u056Ow47n2fiWhKpFTyk3GsZ5zvmTrxp9tBhgL6VpqjuqFkWCLQvD7ItXJSctS139S NO0E3nGEmPYcDC7i+MRhrlvuOZ2tdg6Qp5ogVrl2Pk4ycvrCIcKsZj5/xW1ho6K37VR7 2U/nEr9TOei7T3K0ebe2c6sV79bnzbRX39GjalRtTVt1TKYea5N92+ykQf6LNTeZZKPq BOwRPDO17l8ANNZANg317PCU6FL+fqFZtA2f0N7vTQF8+beWanxOgvQNuynQpYRT92xp eyR+3cu3WU44Csorqdf7GzzL8W7YTrZojQry5qCru9WXy7ZXKcFjY+/ctmRYEmtrxsxG rPJg== 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=sKI71+HnDvWAqSjKAPIgifJ6hRULcxs2a0NSNaclWUg=; fh=9AYDxpIF3ws21qQDvjghHSFUuXpDdpq2Zh/SbnasVRo=; b=QV14KCTBKIIgABSfKDtI6XBkO6bkpIc5uOhNYIaNM0Ubyfwob7+gThOLYqe2yJi5aV V4RCcczTXIlPlMmqWwb9dqSU+nL9BA5330pQmSOlIlih6FMa5b38F7v23tSoRS+SU7NH qx5/GTuoBCIjtKbaM0hNTcdOisKkW6e8XW8uomZs+9mgRprx+r76eA37g4dTWfZ8U55u 9s5Pk6bxyg3jeQ2B7KqVdXq93TukxUhx23+JyTWOTXJ1l7j4U2XgljKG423FebvYnNQV mxOc9v9WAtlhuRGbcquCkcptxWyO8F/i/iGn9Ql6Mr3/8JRWCcLrcUBsU0lP9EnFS+ah FfxA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LCeDELy1; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80337-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80337-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h8-20020a05640250c800b0056587505c83si1460541edb.652.2024.02.25.15.06.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 15:06:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80337-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LCeDELy1; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80337-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80337-linux.lists.archive=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 8E7EA1F232DA for ; Sun, 25 Feb 2024 22:57:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF1943D988; Sun, 25 Feb 2024 22:55:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LCeDELy1" 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 1862D39FFA for ; Sun, 25 Feb 2024 22:55:35 +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=1708901736; cv=none; b=CIbQPkNTGSN6TWbMzkQ97KaibnvOFWYPsTfV6fYa4W8RLz8otuP5cHqPIC252jRMfebBPYVj/pLt4UVqJNDC1nnvB7ZIpYDz57W3AZ6qi6ccbDUoSS+ZqVlPSWF0u7X1duj9tn7hZElXL9Mrgp0q84geVpQVExamU0HfyOvlh2E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708901736; c=relaxed/simple; bh=PZKcGOqePrNpkgM5JGTpq6/R9MYj7zTGFX6r8zvTk9o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HQ7a8yDIXtyXTE7FByWJUNYQiLL/wSHUlaX/zu4oEJROE1neCo2cNpvm/y9ODxIocBd80ORXG+Ub0fgx88uiC9WBkzSYmeSG6WwKVHYCjCTcTj/Dybx1z8xd+KYe2fjsHl7nzrgVy2S/mcRCg8kuXGvDWcgvI76WMT0yahkadew= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LCeDELy1; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6E7AC43399; Sun, 25 Feb 2024 22:55:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708901735; bh=PZKcGOqePrNpkgM5JGTpq6/R9MYj7zTGFX6r8zvTk9o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LCeDELy1YQOown/uvX4TDYiQfujwPApQ0Wh3b2vs/w9bDEbnAwmF8CV0su5cRWPNW xHpVULLwGP5eS72gUd7meM32Szn6p7y0YLXYrSihMmTkSRQ2pY7u8BOy+Nwp2LQQAK JKzc1ZEfKhlWh0s58SjncruAT2eWHpJSwxPKRbyY8PI+yvfn4zY0lWu78QXMeeYKPL pRJS43rBVzBNkR0CJ2sKY3Eec/OrRqjz0GlP2AA9viAVqRaPGDEiQu5HOn8R21p38y HXUoiHarxDYXzOFqXRssm2dy+L33O+4Q6PQbO6PfGhkuCtU9MlFNCRpLqUJUcEBjYi DIXih21NlPdTQ== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Thomas Gleixner , Ingo Molnar , Anna-Maria Behnsen , Peng Liu , Joel Fernandes Subject: [PATCH 10/16] tick: Assume the tick can't be stopped in NOHZ_MODE_INACTIVE mode Date: Sun, 25 Feb 2024 23:55:02 +0100 Message-ID: <20240225225508.11587-11-frederic@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240225225508.11587-1-frederic@kernel.org> References: <20240225225508.11587-1-frederic@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Frederic Weisbecker --- 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 b17895de26b9..b79f5403433b 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -1086,7 +1086,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()); -- 2.43.0