From patchwork Mon Feb 26 22:24:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 206955 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2365818dyb; Mon, 26 Feb 2024 14:26:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUFQq9hOofT+YHpHAi4TkH7kAVSgPqXw4kAbnwW2pwIicvF8jaWGD/W3lz/dMD4qMExM9Tiy+bpOow7otIBCA9Bm3WsLA== X-Google-Smtp-Source: AGHT+IHei++F0+DIuV1I5Bd0x9ImQ9Z6+UQu+PKQk429EfIoxKo9O9Hy2Fq8NJdqwmNOUG5UYqjt X-Received: by 2002:a05:6512:10c7:b0:512:f306:414e with SMTP id k7-20020a05651210c700b00512f306414emr5610597lfg.63.1708986369930; Mon, 26 Feb 2024 14:26:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708986369; cv=pass; d=google.com; s=arc-20160816; b=HzawNkXIos39GgSTkr5LCWn/gKNu1DAdtSEaa9+rmhxEHByOe5KUMn1oXPyzgmSqz+ 0wONVWPDGix2oy6+43LXYtO6LNtRb/U38rEUsFi2q8nt+YF+Oa/yV/PK2jJnihMRuyxw w6n/vRkgnzbq+TjmKnWA/Md5Kiyog+Z0RICRyjEvprvKqex0qaDO4Y4TQ5FoLpwQX8+c g7c0e9ZRLVUXmVqOauSLTsozKlJ1cAHQyugLM9/99rAuHW3DKL9XIU08VJVbJx1XSfJn KVf/onJh04u2rOPuvlsHB5swwOKRq9utPs4Wf45QegC6gtYi/1EXP0w7Pjo8xBxIyTnZ Msdg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=osppYSeV2iCM6IzfY8UpKz76QA26duWZkibTc/Re4NE=; fh=9Ax9dUTktkw7GUAcxhp/hScrn1H6VeDItxi6qdujZxg=; b=f7mxEi3FxwCnKFBgTouQuWRq+WLuj2djhjaNuVk42RVg53q270KOt82eSH7navLRGe HTj3QId6YCswMYVoI7JspumIAVkpNXZNKFdjpBfGO4oGj4wWBdsia6h3CS1ZTjGjWPS3 rRvInINfnQT5s3oRH8L4/YduWoldxcUnTHlqEUiDKJ8oJwYu8isR5TkE80ieCDSpxc0H CL02rYKU1Dl2Ly8OG+NrCWeZ79uoNvT8sNFpx3vqPIT9o0z43MLrGzFPqEopkVQYwbZi 8krIS5q89o+5A66HmGYp6E6QAIex22mH8AU0h+OGZ7qXjDZYJI0fAweNNcpy+XsYDHqg I2gg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=XM7puit8; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-82392-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82392-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id sd20-20020a170906ce3400b00a3eaf97ac5esi130794ejb.922.2024.02.26.14.26.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 14:26:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82392-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=XM7puit8; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-82392-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82392-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 879DE1F24B05 for ; Mon, 26 Feb 2024 22:26:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5D9191332A3; Mon, 26 Feb 2024 22:24:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="XM7puit8"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="3Deb2fBd" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 A27D0133417; Mon, 26 Feb 2024 22:24:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708986277; cv=none; b=llW1DY98+SE/6jCax0MyyyNKtzzR5mWgJgiwF0d3nL5dtX+vOQF/nEb3nvZf/6kzGx9o7iRnJ4G5Z+MfPZ1H1i0s5jkXPuG9U8QYEDv2C5NJ8PaJnGLCDLj2ALbq1tx7wKlnZjjFisvo8cByv4pFjlioeJvNG1ce4TqIqc118UA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708986277; c=relaxed/simple; bh=0DolrdCThru8iBJGFDW09pdN3p4sNRZts6fqmyfWjt0=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=DPNbQ1aI8wrqAd5+5NE2IRuhwIIHiiCxFpTkq0U84TFvqBPtF5xv7inrkwLWRxgyObDS1HnfQzUFv1RUcsvwjvw8cnxK3WY6cEt1ksJ7ll5l4KI33H0UxEOWih3dFQvO2wQoXQkbe9lufe6iPhPFB4UFrklImmccG4I5jfGatQs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=XM7puit8; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=3Deb2fBd; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Mon, 26 Feb 2024 22:24:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708986273; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=osppYSeV2iCM6IzfY8UpKz76QA26duWZkibTc/Re4NE=; b=XM7puit8Cy/IfBtAUlsQirXA9H8MYrohLdUCUPc2TJfNJPnNVXYsuEN8TfpjWKTACwKEpY AefEnWCa9VI22y7tFMBNBmKrOEthLjMlF9wOou+guAy2ytgEsFRcNmYo5tgmiFKzB7jZ4f jqsKn5MFw5oS1fB2acpicbcjZFCefZg8Jb9YLlIJwvJJp8celDGXQm6Gim6g4oITyD8bE9 GTT2AJ4Ex/HJGkoSzkGgqftRw3ogJZDERo2t/ZKGCLlkZGxFxSGDvbHlg0wEm0NeN6E/QI gEJ6GV8kfEGZXJdRF3VnzUq1a2kXwe3X4Miq6HZYr30Osp8HYsGngWMjrrwzXw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708986273; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=osppYSeV2iCM6IzfY8UpKz76QA26duWZkibTc/Re4NE=; b=3Deb2fBdY1PlZOH6dyNKjkS2dDTsSd00HPxuE6khB1F6XBCgoHiaapu/EepmJ2vLWEUHPr UKMVNsP3ZF6rQ4AA== From: "tip-bot2 for Frederic Weisbecker" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] tick: Assume the tick can't be stopped in NOHZ_MODE_INACTIVE mode Cc: Frederic Weisbecker , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240225225508.11587-11-frederic@kernel.org> References: <20240225225508.11587-11-frederic@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170898627305.398.18387562439235037420.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791913473037167437 X-GMAIL-MSGID: 1792002091655531894 The following commit has been merged into the timers/core branch of tip: Commit-ID: d9b1865c86aec7c515db5718e4820106c2c12db3 Gitweb: https://git.kernel.org/tip/d9b1865c86aec7c515db5718e4820106c2c12db3 Author: Frederic Weisbecker AuthorDate: Sun, 25 Feb 2024 23:55:02 +01:00 Committer: Thomas Gleixner CommitterDate: Mon, 26 Feb 2024 11:37:32 +01:00 tick: Assume the tick can't be stopped in NOHZ_MODE_INACTIVE mode 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 Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240225225508.11587-11-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 b17895d..b79f540 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());