Received: by 2002:a05:6a10:144:0:0:0:0 with SMTP id 4csp738709pxw; Fri, 8 Apr 2022 21:55:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxArPr3bqYKKDc3p8+2li5YlQ/nxohhQgKdRlhurawPh4eezrX1EQsblrmCkFjmgZp3M1d8 X-Received: by 2002:a05:6402:350b:b0:419:1c11:23ed with SMTP id b11-20020a056402350b00b004191c1123edmr22951738edd.8.1649480107887; Fri, 08 Apr 2022 21:55:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649480107; cv=none; d=google.com; s=arc-20160816; b=agc5kaYxS4wTETTWaKBJEquQTXs2E3RD0fbnpPxarj/ItxXofOAG4OCsnqv6osPpv4 f2ff862w92SRvhVC5GaF/gIcVJfnGhqhFaLpTMCEicdTDQwTn308B1rq6+KUThmyGbjs NulNLQCFk+2h2LdBiswTALw4SY2M2Xgi3VXOxSPvo0Lj6JIPNzjPnReX1DlZO4YoKWiv M6W5FhVYT84upFu1/O//bxdMSP4Hx5t4ACCaB97RyNCWoE9Z2Z8JdPDRfNFcDB6Cahze a7VYSGRMXlZkMROy8LAGixR1vRC8Je5XFES9/VBILrY1652ePi5dH6F6Q0wCqL26/zY6 3RZA== 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=20cblYgcj8wwmYzdqmy5MxL45d1WRVnIgVBKhhP/LaY=; b=gKVqqjWCwZA/7IhbiB+DtyDANMmglzi5dn6kVBp1+MpImY1JulLBlma8fVNAi37wxF GX0lAGTdOZlV4CRXWQXfIJd87RwubUR0XwLdXpw8a0cjZ14A2TJA7D0oNQdKOySycwcR SWrfjsQKOpYYJfUmfwNdbpCgg3ukw0bFiDyYmyL7DSm/O87y1JGwyXIYxZMXLU/GrjcX oVqN45hxgBZwM1rEo++yTZVk1Ho+izTOzEJ7CQUhV+nqEuVTTCVmkfe5AUj98F/zzmwJ 3p2NxTg1lKwoUIkDN0m1lQcHI9GoBrP+ioxY28gi5TXHmjBAY4Pi7Xw6KI+WDQfmaDNZ 30Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=THHFFrQv; 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 c72-20020a509fce000000b0041d159960d6si2153166edf.218.2022.04.08.21.54.43; Fri, 08 Apr 2022 21:55:07 -0700 (PDT) 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=THHFFrQv; 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 S237526AbiDHP1Y (ORCPT + 99 others); Fri, 8 Apr 2022 11:27:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233157AbiDHP1W (ORCPT ); Fri, 8 Apr 2022 11:27:22 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3254C31DD4; Fri, 8 Apr 2022 08:25:18 -0700 (PDT) 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 DCB4FB82BAC; Fri, 8 Apr 2022 15:25:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9EE7DC385A1; Fri, 8 Apr 2022 15:25:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649431515; bh=lLdH9Tp31qVuDIwxFUvLKg4vvD9EROe9TrYZvdNywfQ=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=THHFFrQvwqFwzDRCdt2DzTm841P3QGqq+p7YQ+zaVRrbSElHj4UFnGfdZ4pXn3EhR 19UN/LqO0/pdPVb5eiOeXwOgTsTeTk6PF7ExmjsVDW2tR3+8DP7/QMW41Nuu4kzMTu uo4Ze2BcNIlGXH8sUMfeIw/L4WjC5dLl5lJalT5U2ABIsXnVUDsggQxZjefAS3PksJ k9aS+E66brH29s7RwwuEGQKe/AGTHg0g/5ImZkQpEDOfLVPrQzMKlgWdCuX1CGJ9G4 EdVzIKOPmOfgLjX7RAFNeyMRrSEWo6r3AbiBjueAVCQODho/ydcIk+lSS+9D2/aZvB LoKKPJCmtDghg== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 457AE5C0176; Fri, 8 Apr 2022 08:25:15 -0700 (PDT) Date: Fri, 8 Apr 2022 08:25:15 -0700 From: "Paul E. McKenney" To: Joel Fernandes Cc: Kalesh Singh , Suren Baghdasaryan , kernel-team , Tejun Heo , Tim Murray , Wei Wang , Kyle Lin , Chunwei Lu , Lulu Wang , Frederic Weisbecker , Neeraj Upadhyay , Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , rcu , LKML Subject: Re: [PATCH v2] EXP rcu: Move expedited grace period (GP) work to RT kthread_worker Message-ID: <20220408152515.GD4285@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20220408045734.1158817-1-kaleshsingh@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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,T_SCC_BODY_TEXT_LINE 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 Fri, Apr 08, 2022 at 06:21:03AM -0400, Joel Fernandes wrote: > On Fri, Apr 8, 2022 at 12:57 AM Kalesh Singh wrote: > [..] > > +config RCU_EXP_KTHREAD > > + bool "Perform RCU expedited work in a real-time kthread" > > + depends on RCU_BOOST && RCU_EXPERT > > Doesn't this disable the fix if a system is not RCU_EXPERT ? Please > see the definition of RCU_EXPERT: > "This option needs to be enabled if you wish to make expert-level > adjustments to RCU configuration." > > I don't think a bug fix counts as an expert-level adjustment. Good catch! The constraints that this Kconfig option must meet are as follows: 1. It must not expose innocent bystanders to additional questions in response to "make oldconfig" and friends. So, if you build a kernel, then apply this patch, then run "make oldconfig", this last must run to completion without waiting for user input. This point is not trivial, and everyone who has submitted a mainline pull request violating this rule can attest. ;-) 2. Enabing RCU_EXPERT should be the exception rather than the rule. (This rule is all too often honored in the breach.) 3. If a given Kconfig option is to be selected, it must not depend on RCU_EXPERT. (Otherwise, the build system complains.) So the question is "Does Android already enable RCU_EXPERT?" If so, having this depend on RCU_EXPERT, though not great, is OK given that Android is the only expected user. If not, another option is to make this option depend on ANDROID or some similar Kconfig option that Linus does not enable in his kernel builds. > > + default !PREEMPT_RT && NR_CPUS <= 32 > > What is the benefit of turning it off on PREEMPT_RT, even if > PREEMPT_RT does not use expedited GPs much post-boot? I would think in > the future if PREEMPT_RT ever uses expedited GPs, they would want this > feature even more. I'd rather be future-proof now as I don't see any > advantages of disabling it on !PREEMPT_RT (And a drawback that the fix > won't apply to those systems). Also will keep the config simple. Current PREEMPT_RT workloads do not care about synchronize_rcu_expedited() latencies, so much so that they boot with rcupdate.rcu_normal=y. Plus the kthread_create_worker() function does not yet have that many users. So it makes sense to fence in the effects of this change. Of course, if you are instead saying that ChromeOS also wants low-latency synchronize_rcu_expedited(), let's figure out the best way to get this change to ChromeOS users as well as to Android users. ;-) Thanx, Paul > > + help > > + Use this option to further reduce the latencies of expedited > > + grace periods at the expense of being more disruptive. > > + > > + Accept the default if unsure. > > + > > config RCU_NOCB_CPU > > bool "Offload RCU callback processing from boot-selected CPUs" > > depends on TREE_RCU > [...] > > Thanks, > > - Joel