Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1251691rdb; Wed, 24 Jan 2024 09:09:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IHAGWXwEakqrIibhfm4nH9jBucjWyE2PFmw75kzsuSIbn62BJmEds2aAB4KfOIo6OOWd3hi X-Received: by 2002:a05:6a20:9390:b0:199:39f1:8123 with SMTP id x16-20020a056a20939000b0019939f18123mr1134654pzh.1.1706116186229; Wed, 24 Jan 2024 09:09:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706116186; cv=pass; d=google.com; s=arc-20160816; b=dRDW6TegAEe+Ts68LPKk2wBL5wyS5rR7bC0mdOBAwJDO043/MAY4hBg4f+3FhF+RDu ui84K42V8vsHUnEfWBSyegifTl/prrIoWQ0udXRJcmiJiSg0wXc6lEFF70gOtXRQTxv3 mFwIVCgeHcRi38SUrAuz9XJFOtPnt+tHLyA9qMFsY3M3bAJuiSqFCDoU+Uy7TIFUFZ/0 DRg5YoL5AIhnq349/tyStQpG+mEaongB21AXWyiQ4Y+WerNL1VvCLHHt6gPeEICr/KDv XUvS9QawShf54rXJ14VKFk6/OxLIGXGjV+kTEg95QNc4XaiuLMa3v1ak4i+p2e8Memca 7msA== 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=Z/3+VfU54wYuMD8im1IhMoaPzO2qnhXXIIcFb/vaHI0=; fh=9AYDxpIF3ws21qQDvjghHSFUuXpDdpq2Zh/SbnasVRo=; b=D1hYoShU7ie3HN8+6f7wR8shzeKbNNp40fpqiQAoo2C+zhs4lNP7LLkgqwN27U33Bi rPSYNmRdpYVH9CZYJVKc+2j6ajY03JtnAXl5xa5hBdWf5gE8Kz4R8Pu2l8Y7ZvIJpFPL ex8CMceFhfCrubmOqh5hHeHzCNPaXn+/Q2huJQaQZqe3LxOCNgHeBv8os9tN8n3XGp2m vklZKFqaibBGZ8nrO99SsPcy7pS3lL2Bqp2ucrjJL3DOHl6el8f7FixuT6idHPa+KWue PVhb4j2FCg9vMHTld8kSPAtasDXrXTwQxMxlBECrkGrNd1OV9CBpgvVe7+Y8fsNxNwiz OEig== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Dyiwnhku; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-37389-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37389-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bx19-20020a056a02051300b005bd27be66e1si12306164pgb.719.2024.01.24.09.09.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 09:09:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37389-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Dyiwnhku; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-37389-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37389-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E0DF62891CA for ; Wed, 24 Jan 2024 17:07:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 61A7C1272CB; Wed, 24 Jan 2024 17:05:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Dyiwnhku" 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 9187C1272BD for ; Wed, 24 Jan 2024 17:05:33 +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=1706115933; cv=none; b=OOS6kInZWYh81VpAQhgxWCMN9dELvQPq+E+r4WghaiG6DhBZSxBXU2lXUe4oepEcBB3T2YmT3A+8nun97Mo7bV4o5nIB5OssHBh88+XikaywdTwATHH0RyUwNi71Mh1b5xwoHyjrnlrMBy3/eVeOpR6KfIrcvQJYdDrfL8l/3Ms= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706115933; c=relaxed/simple; bh=xd9lp8Dgdk3GeTXPSlcpQ+XIBvUrAdTXmBLHdrTRoNA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cTdM0eT2EbmWRNh1Fxv8OqQtOlI2cqY2fHqnya8sOSjRq6VzdweKLZmXNhciSDo8lcNfY6nssL3fQO+M64TqiuW3M0YRYy8YSy+qWZ+FQrBq8wtknjR9HLX2lHbgUaTUwlJb5fsa27JtNq4gkvGwePvFuadSY07a9v2VEGQo9aA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Dyiwnhku; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C9F7C43390; Wed, 24 Jan 2024 17:05:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706115933; bh=xd9lp8Dgdk3GeTXPSlcpQ+XIBvUrAdTXmBLHdrTRoNA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dyiwnhku/izDEmU5i9UcrzJoBersWd9xawziwUnL9ig6NdCzpjo+HyFv4hbHyVClj EvSJLB5669yZJOa0zipBW5kH5Yop6DN8kEhUF+w02RlKTo9WXM7JpZFtr9//XMpqvs 8KKejZReOjht4rqgK536aSxhUz1OrPEqj1O3ZISMVP+9lbr99Pl7+Pfbu9AY2IMw87 Wb9AcrbamYC+qpqXFkWFlQckCSuZxK3139LdAr/S0ibu8/KQCmx29i8B5/2/rxRMfJ oiMEdGprze6Q6eV0FwydQmmw/ep+pErXxGF7PQmf8C4MMvE5GI8w5p7MHst9sLpDle PzPuHWXkYByoQ== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Thomas Gleixner , Ingo Molnar , Anna-Maria Behnsen , Peng Liu , Joel Fernandes Subject: [PATCH 10/15] tick: Assume the tick can't be stopped in NOHZ_MODE_INACTIVE mode Date: Wed, 24 Jan 2024 18:04:54 +0100 Message-ID: <20240124170459.24850-11-frederic@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240124170459.24850-1-frederic@kernel.org> References: <20240124170459.24850-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. 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 e8e3b5d447e9..3104fff89007 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -1044,7 +1044,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