From patchwork Wed Jan 24 17:04:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 191669 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp1127617dyi; Wed, 24 Jan 2024 09:08:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IGd8t7nD9xEwuc1a9d8IlN29/xQSKqlqifT8COeaZImdLr5lQ268LW+Ape8I2PATPQnK9na X-Received: by 2002:a05:6808:693:b0:3bc:3c91:e2f1 with SMTP id k19-20020a056808069300b003bc3c91e2f1mr1547135oig.55.1706116089359; Wed, 24 Jan 2024 09:08:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706116089; cv=pass; d=google.com; s=arc-20160816; b=OkhF3Fq1innZRMfbVECEG5H0JGOVE2UuXNDrnD1vLQ2H7/KRqxpNtWlDZT7AQnHLFC 4lceiQ4l/QuR77Cs2Wmyo2peHcbkttja5WL8voBHXabSyFz3g469fBmrce6rrIWh30+W 3fmxLMzMPDZ4ScKXcbbiANKlMNtSSJjS0H0mndJyhnWVJRuvleV2CmCRSaL8jP1Jyyf3 PEjmXOrHZtL81zHqgDUrDQlGxBOjeWuC2648XzUqx4kVog7coDRQnKdcCEOTevWwVu9V 55h2uToaTg2xCXpmrXcqiTfSG0RkmZo+AP8c04d1Y7bMuf9nsNTAgGdvFcRuCOTKV11H KF+A== 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37389-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id je1-20020a056102178100b004672c09d48bsi1219998vsb.730.2024.01.24.09.08.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 09:08:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37389-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37389-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4B1311C23393 for ; Wed, 24 Jan 2024 17:07:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D0937E789; Wed, 24 Jan 2024 17:05:36 +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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788992383978069664 X-GMAIL-MSGID: 1788992383978069664 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 Reviewed-by: Thomas Gleixner --- 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());