Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1665999pxb; Wed, 9 Feb 2022 01:38:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJwizcBoqW3vwv5/sdNnRmpOOdJBzyrN1yWznfBWGnxYtEg08weVgSLEii3q7o3zVpGwIi9/ X-Received: by 2002:a63:6942:: with SMTP id e63mr1221975pgc.226.1644399483618; Wed, 09 Feb 2022 01:38:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644399483; cv=none; d=google.com; s=arc-20160816; b=hjYP3jFaT63/Ru8DFbNrLlO5uEe4ur/5gLewfIyc7JH434G/00LnhbXz3R5zdhbLXH 6KW8Fzkijka5xqNFjPxSiFXAQdn1tXX0ncSabSuddvZN5AM9KlsBD+som38gxgShHyYM pMxrCKLQotfMbwG8++lspJKibexY2Itzmc/JJ1yq4yfsMZz4SYiq/10ALkDlY+bh1zd7 TRZKkNjU7oU3JaUH8otV6VZqChBXjNm2F3wJrdQKDSwXNndPrjylq1Ma2qmL2BjPKOl5 QHQFL5oSl59uc2c1nKGygD4Oz3fxRebW8niFIb99kuPWTOAViFgjtv4LAr9ZYtHjrDfa KCfg== 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=uN1u71iNft9Gp0zNuZ8Ev790+mLjuEAo3Eu9Uto4ghg=; b=hhclJaHg273jGm6f7Zao77uKs8cWPDxgrbhDIzaulzXpZistrSDcYPsYJUnOrHzwsz GmS1FfJttw6Ad6yOuY8mHveqOBWahlmEzk1GrEMqzvRIST0HxsmvtSeXbtiS/9v0x9aw FLeU//qxkHH0y5CxO/2DuP7v9q6L/2ZdYSte35cXoK9CN7eEGHs86diLV9IISgwgKDzR HuYC5MyVYMP/+DAgJaE4ICeR5D06LALoDDu006TMNps/lhEQNGCcJPPyh+388dBYDENS eg48UlngPyyVyC+QKdfsCTqVVgWnc54762ZVXeEKNklQWY2GIAvJ2tGME4ZNumrZzqsd oymw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RQfLUiJy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o16si17584504pgu.129.2022.02.09.01.38.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 01:38:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RQfLUiJy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A4B03E01565F; Wed, 9 Feb 2022 01:02:46 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382879AbiBHQQs (ORCPT + 99 others); Tue, 8 Feb 2022 11:16:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239418AbiBHQQq (ORCPT ); Tue, 8 Feb 2022 11:16:46 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FA0EC061579 for ; Tue, 8 Feb 2022 08:16:45 -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 2A4F2B81BDD for ; Tue, 8 Feb 2022 16:16:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 795C3C340EF; Tue, 8 Feb 2022 16:16:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644337002; bh=Vs+f44lnIytigGrVrSLdddTGPc/R0+RbyevkTBO4lDQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RQfLUiJyd68l6VijxFrp22OLIznr/JZtNc4GHEChy1E7TVLfk8fpIqn+2fU5A0QJo vTEifznow0XuSy7yFo0DLtu6VOa3+hpfjr1JMpQGrGOt4/lse1f74875y9Kixt9IG5 st7bHcha7BbGAvcoAG0te44ocZif55surenEU+UmqYGVZrFLdCsae9UzNMK3pXlV/T /4L+1NBBkAKYZXe8xCrXaYkv1zr+feR2q75HpreGKHH9whSVW4dhOB8nPeo+XFgQTa KG2mmgHLqSYEtBU6aPjMvwHtea50vV/0IesNGkA18jEV2dYiLAXrugFjJATYJSln9N sqcFF56iUM8Ug== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , "Paul E . McKenney" , Peter Zijlstra , Thomas Gleixner , Paul Menzel Subject: [PATCH 1/3] tick/rcu: Remove obsolete rcu_needs_cpu() parameters Date: Tue, 8 Feb 2022 17:16:33 +0100 Message-Id: <20220208161635.544701-2-frederic@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220208161635.544701-1-frederic@kernel.org> References: <20220208161635.544701-1-frederic@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 With the removal of CONFIG_RCU_FAST_NO_HZ, the parameters in rcu_needs_cpu() are not necessary anymore. Simply remove them. Signed-off-by: Frederic Weisbecker Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Paul E. McKenney Cc: Paul Menzel --- include/linux/rcutiny.h | 3 +-- include/linux/rcutree.h | 2 +- kernel/rcu/tree.c | 3 +-- kernel/time/tick-sched.c | 10 ++++------ 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index 858f4d429946..5fed476f977f 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h @@ -64,9 +64,8 @@ static inline void rcu_softirq_qs(void) rcu_tasks_qs(current, (preempt)); \ } while (0) -static inline int rcu_needs_cpu(u64 basemono, u64 *nextevt) +static inline int rcu_needs_cpu(void) { - *nextevt = KTIME_MAX; return 0; } diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 53209d669400..6cc91291d078 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h @@ -19,7 +19,7 @@ void rcu_softirq_qs(void); void rcu_note_context_switch(bool preempt); -int rcu_needs_cpu(u64 basem, u64 *nextevt); +int rcu_needs_cpu(void); void rcu_cpu_stall_reset(void); /* diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index a4c25a6283b0..80faf2273ce9 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -1086,9 +1086,8 @@ void rcu_irq_enter_irqson(void) * Just check whether or not this CPU has non-offloaded RCU callbacks * queued. */ -int rcu_needs_cpu(u64 basemono, u64 *nextevt) +int rcu_needs_cpu(void) { - *nextevt = KTIME_MAX; return !rcu_segcblist_empty(&this_cpu_ptr(&rcu_data)->cblist) && !rcu_rdp_is_offloaded(this_cpu_ptr(&rcu_data)); } diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 17a283ce2b20..2abb5112feb9 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -768,7 +768,7 @@ static inline bool local_timer_softirq_pending(void) static ktime_t tick_nohz_next_event(struct tick_sched *ts, int cpu) { - u64 basemono, next_tick, next_tmr, next_rcu, delta, expires; + u64 basemono, next_tick, delta, expires; unsigned long basejiff; unsigned int seq; @@ -791,7 +791,7 @@ static ktime_t tick_nohz_next_event(struct tick_sched *ts, int cpu) * minimal delta which brings us back to this place * immediately. Lather, rinse and repeat... */ - if (rcu_needs_cpu(basemono, &next_rcu) || arch_needs_cpu() || + if (rcu_needs_cpu() || arch_needs_cpu() || irq_work_needs_cpu() || local_timer_softirq_pending()) { next_tick = basemono + TICK_NSEC; } else { @@ -802,10 +802,8 @@ static ktime_t tick_nohz_next_event(struct tick_sched *ts, int cpu) * disabled this also looks at the next expiring * hrtimer. */ - next_tmr = get_next_timer_interrupt(basejiff, basemono); - ts->next_timer = next_tmr; - /* Take the next rcu event into account */ - next_tick = next_rcu < next_tmr ? next_rcu : next_tmr; + next_tick = get_next_timer_interrupt(basejiff, basemono); + ts->next_timer = next_tick; } /* -- 2.25.1