From patchwork Fri Feb 10 14:09:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 55418 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp977641wrn; Fri, 10 Feb 2023 06:20:11 -0800 (PST) X-Google-Smtp-Source: AK7set8xAmBkpuwyki9yHLM68JfmYjFaRtey2eTbQLxTc3Q5NrjBjz2AKAPXWzhiKhFZRGB6cmJo X-Received: by 2002:a17:907:6e8f:b0:88a:d760:19ac with SMTP id sh15-20020a1709076e8f00b0088ad76019acmr22010093ejc.1.1676038811519; Fri, 10 Feb 2023 06:20:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676038811; cv=none; d=google.com; s=arc-20160816; b=BIfYhoVEPOrMnN8kEWK9RtM9l8vT2onulVnJVhwrGQuRaTeuIT2GHSectoriPEDPQy jspymdRNokJn9UHq70PhnqfFIbKK6WBS3zqm+Hr3VUoN3++02KkOF/6wABBlz+CBRDiA nEEw40kARZv57CkCv6FhVR5KD78O+RtARH1YcBsv8e0Yqoq+AVKg2cMGViOFauieUAfM ly5DChoq6QVl40oF5lGdeVMsEPF/BBV23q3fdoyOTHCK5LNUSn5GNSYhbH3jwpRThXV5 V08Ag3Eo3zBx+ide/G8HmYxKzKsBTMl2SICbZIoDJey18/7Lg3AUYWhmSWM7fmsl/IGo miOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Inuo+DccMpte9YIXtwQ9ihZlrHO32Y9h4Zg41uQmAmo=; b=we9tKeQNW13e4eHScZ3jZ6Gj6hOLhF2eQiBxIb2K7nCVuglYTYbb2tMD/r4H432gaa R0taVyFzJwdCQYYPknPtwC3w4Vr7FK9cIK8dMbWf/RVy6ByH33cg/+44/YcJHKNkIx5q l5MWARvkw/Q5FTs6SafZX/zdEy9S0j1MVFAEnJxxXWGf29dG3TUahBzJbS3sJFAUsiMp K673vz95yzVfm7nMysFsmRJj4H3FvqHtnVUCpMnMKJocYsxia00AiZz1Dtqr4vZsXknx GfzHpc73l3BPrVKERBvIJB+959HVWj73A63azm+NlZyB8HyHV2WIaI038/VpH6SmqUoK vuoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="K/0jBDC/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n29-20020a17090673dd00b0088eefdc75c8si6379496ejl.732.2023.02.10.06.19.48; Fri, 10 Feb 2023 06:20:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="K/0jBDC/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232491AbjBJOKR (ORCPT + 99 others); Fri, 10 Feb 2023 09:10:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232489AbjBJOJx (ORCPT ); Fri, 10 Feb 2023 09:09:53 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F01B74077 for ; Fri, 10 Feb 2023 06:09:40 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9E4E3B8252A for ; Fri, 10 Feb 2023 14:09:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21966C4339B; Fri, 10 Feb 2023 14:09:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676038177; bh=/jXn/vnDl0cDz/KxBmavjhz+/0Xao8NYmx2pabP5Zx4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K/0jBDC/fMsnlIotZfR27XyUnoZAGtly6nQErhHRgQGnqqJKeNqcwk4AifODzILik kAKP+wCFxOBpg8K7GGp48xIXbzDFrmmS6IbNgnYFH0F5iB3DUg02eTjc0xi/YLHbt7 Fp5IDGzrrXA6YVu2fiqpcTa/JSZkR8I467GGH59b1zgQSHmKQrY0ZMGTCw1QK+zu6p bT4dkVZGhq7YrXFv4dxexV95Rylakm7gf3RqcBFSLBz9kvtlPffJ1pnKh7pXozchBd RUX8WwYq4wE8/s6gYsYcntQXf/vuqwmUvLGETk+SYEMrS5EdFw6I2S026Oa23G8pBc TMzu2JVON+NvQ== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Alexey Dobriyan , Peter Zijlstra , Wei Li , Mirsad Goran Todorovac , Thomas Gleixner , Yu Liao , Hillf Danton , Ingo Molnar Subject: [PATCH 5/6] timers/nohz: Remove middle-function __tick_nohz_idle_stop_tick() Date: Fri, 10 Feb 2023 15:09:16 +0100 Message-Id: <20230210140917.279062-6-frederic@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230210140917.279062-1-frederic@kernel.org> References: <20230210140917.279062-1-frederic@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757454072620207299?= X-GMAIL-MSGID: =?utf-8?q?1757454072620207299?= There is no need for the __tick_nohz_idle_stop_tick() function between tick_nohz_idle_stop_tick() and its implementation. Remove that unnecessary step. Cc: Hillf Danton Cc: Yu Liao Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Wei Li Cc: Alexey Dobriyan Cc: Mirsad Goran Todorovac Cc: Peter Zijlstra Signed-off-by: Frederic Weisbecker --- kernel/time/tick-sched.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index bd9499fb15b3..7065c6e373e9 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -1080,10 +1080,16 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts) return true; } -static void __tick_nohz_idle_stop_tick(struct tick_sched *ts) +/** + * tick_nohz_idle_stop_tick - stop the idle tick from the idle task + * + * When the next event is more than a tick into the future, stop the idle tick + */ +void tick_nohz_idle_stop_tick(void) { + struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched); + int cpu = smp_processor_id(); ktime_t expires; - int cpu = smp_processor_id(); /* * If tick_nohz_get_sleep_length() ran tick_nohz_next_event(), the @@ -1115,16 +1121,6 @@ static void __tick_nohz_idle_stop_tick(struct tick_sched *ts) } } -/** - * tick_nohz_idle_stop_tick - stop the idle tick from the idle task - * - * When the next event is more than a tick into the future, stop the idle tick - */ -void tick_nohz_idle_stop_tick(void) -{ - __tick_nohz_idle_stop_tick(this_cpu_ptr(&tick_cpu_sched)); -} - void tick_nohz_idle_retain_tick(void) { tick_nohz_retain_tick(this_cpu_ptr(&tick_cpu_sched));