Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp6241377rwj; Wed, 21 Dec 2022 12:41:32 -0800 (PST) X-Google-Smtp-Source: AMrXdXtZoczhLNBWlmVX1bdLfBbfZcAm7D4LhVa2D51TcMx3x31uu9JPC6QdZAomsQULyqD2pADw X-Received: by 2002:a05:6402:2488:b0:46b:34a:3945 with SMTP id q8-20020a056402248800b0046b034a3945mr3272366eda.31.1671655292328; Wed, 21 Dec 2022 12:41:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671655292; cv=none; d=google.com; s=arc-20160816; b=k2kw6KFNCuBhKTr914pvjs8woeONdMmzzFjoPUHdNl1IBKULburKC4BPbRZI6QxLCe DxXWUk23pnb9uaeYIIse4miGpPwtmzIIHmZ8LPNMqEWcXtO+JqbuF9GTju167l2EXaAL N87/vnVdP/FNeM83Jjb5CbYz+EarqhvdIQpKysMND+fz4RMF+Qs5NpWvDRK1plFBo1do jkvcZyJBEaZK9roHDKVaupG6ARabxc4x1SndMRZqcg3eB9EfmX2mXIA43X4m9kDL+pPM a9ay5LHwMgHUsIXe8soSMb7LjXDIExXmakwKt9+snZbG+HV1lmQ0BR5rHA8MbKTX+R53 hdkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=vYcBYg6KsxSRdw3JYDZcas+Q3oxpVqyPFEqkzmuv2sI=; b=SQZKyrTeHmdDvkRwHMjgvtAoTWhMAZXNuaCm65fx62O2iR7PuND6+vw73kPSaJRUXJ /1wEGX2X926xhfhQH3oCDMH91gv3WTW37jMZ+tqboLwPwsbGGVGcEiTjaRiwsZb4mVqJ dbDTjZ3RM38oB63WdE0EO7Ef0ZxviCctrZNTT8rRGDd/qcVeP3GL35JxI+JYrq7FklDf sSOEjEW8T62MkgSAaGLeSexZZ/IcDVR4OnRI3touG3BKI3RwuZVK1FU0WNaCZmQfMsPr k85ki+TDFAk1+1A3PD//q+RrMxViC5cveZyTIplAuAaBnuoYEUQN0B+0xmxG0VU2V/v4 fI0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aN6NkNgm; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y2-20020a056402134200b0046abbd721e4si3352692edw.300.2022.12.21.12.41.16; Wed, 21 Dec 2022 12:41:32 -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=aN6NkNgm; 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 S234806AbiLUUQi (ORCPT + 68 others); Wed, 21 Dec 2022 15:16:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234754AbiLUUQg (ORCPT ); Wed, 21 Dec 2022 15:16:36 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99C5CBDE; Wed, 21 Dec 2022 12:16:35 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 3679961926; Wed, 21 Dec 2022 20:16:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90ED4C433D2; Wed, 21 Dec 2022 20:16:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671653794; bh=hg2Kn9h2HBlKWh0BcTWlEi5gwHmpS1nBQDmwTLKHBcQ=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=aN6NkNgmUlJRWyexy7G/rLGPauYIOmxbia55zJCognHglSuZUlBaJZeA9WqD2xxP6 noHNbQnG66pkJzglrEOZGuztVkMJBeFt4wSOai/Xto931au9FrZVL4wex1R5PgyK1v IJwXSNmy3Hpap64eIZw4K8bSSKEg5ZNHAS8F+JVrmlJccNB0FoTQSGqTvlkSIMNWog 51z6H2eLv4hGK/Y01ZaNSXWCm7UqmismF1BDaRImAIJymfJP396ntfY6Ri8cWxK6ld /TIAdP2wdOGUNYpkDnWI1Mg4QynWf388o0Vj4sOfGHJDssc0yhCWFhJYdFio2F9dRV wlohh9saZ0yAA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 2C9F15C12EC; Wed, 21 Dec 2022 12:16:34 -0800 (PST) Date: Wed, 21 Dec 2022 12:16:34 -0800 From: "Paul E. McKenney" To: Zqiang Cc: frederic@kernel.org, quic_neeraju@quicinc.com, joel@joelfernandes.org, rcu@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rcu: Fix missing TICK_DEP_MASK_RCU_EXP dependency check Message-ID: <20221221201634.GH4001@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20221220141625.3612085-1-qiang1.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221220141625.3612085-1-qiang1.zhang@intel.com> 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 On Tue, Dec 20, 2022 at 10:16:25PM +0800, Zqiang wrote: > This commit add TICK_DEP_MASK_RCU_EXP dependency check in > check_tick_dependency(), fix commit df1e849ae4559 ("rcu: Enable > tick for nohz_full CPUs slow to provide expedited QS"). > > Signed-off-by: Zqiang Again, good eyes, thank you!!! I have queued this for further review and testing, given that it affects pretty much only RCU. However, if someone else would rather take it: Acked-by: Paul E. McKenney Thanx, Paul ------------------------------------------------------------------------ commit f22caef6cda5ed19a55ec2e703f60f1fa85e52bc Author: Zqiang Date: Tue Dec 20 22:16:25 2022 +0800 rcu: Fix missing TICK_DEP_MASK_RCU_EXP dependency check This commit adds checks for the TICK_DEP_MASK_RCU_EXP bit, thus enabling RCU expedited grace periods to actually force-enable scheduling-clock interrupts on holdout CPUs. Fixes: df1e849ae455 ("rcu: Enable tick for nohz_full CPUs slow to provide expedited QS") Signed-off-by: Zqiang Cc: Steven Rostedt Cc: Masami Hiramatsu Cc: Frederic Weisbecker Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Anna-Maria Behnsen Signed-off-by: Paul E. McKenney diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h index 2e713a7d9aa3a..3e8619c72f774 100644 --- a/include/trace/events/timer.h +++ b/include/trace/events/timer.h @@ -371,7 +371,8 @@ TRACE_EVENT(itimer_expire, tick_dep_name(PERF_EVENTS) \ tick_dep_name(SCHED) \ tick_dep_name(CLOCK_UNSTABLE) \ - tick_dep_name_end(RCU) + tick_dep_name(RCU) \ + tick_dep_name_end(RCU_EXP) #undef tick_dep_name #undef tick_dep_mask_name diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index b0e3c9205946f..ba2ac1469d473 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -281,6 +281,11 @@ static bool check_tick_dependency(atomic_t *dep) return true; } + if (val & TICK_DEP_MASK_RCU_EXP) { + trace_tick_stop(0, TICK_DEP_MASK_RCU_EXP); + return true; + } + return false; }