Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp422203pxb; Tue, 12 Apr 2022 05:10:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEdX5K5b0AIMqIkGEdvndDwptGoN12mUFuKuazm5AD7TqB6L7FAa9ZO1PqkEpOkBriRoj3 X-Received: by 2002:a17:902:cacb:b0:158:694f:23ff with SMTP id y11-20020a170902cacb00b00158694f23ffmr9157052pld.119.1649765417914; Tue, 12 Apr 2022 05:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649765417; cv=none; d=google.com; s=arc-20160816; b=E3dhVxfrvK3IIY8p7L9/07g8atEgNocE/q7yUy7Mc8kCcJxgxIZV12KAlYYlrCWUTI oDre1838mF9hd9AYjRVGs1RxnWZ4bmqIRtJM3z/sMNGlLBsyfRlkcOqS76yNvpGSkgmW SeaIo/nKiIHyGrTHFP4NCeTZIh04D6hej05if9xfL/zbksbeXtqivQOjeYFrVxOcKGh9 PJZ0qJj8yn+Emp6+x/zWNUchJezvuTCNrQXyO8jVQ3Ym2bxn60CTskveMkmf/pudhMLQ h85hAZUxfaGeSonbRJw+d9jg8iFNYemnRgzp++aagelGBY4t9NtEnI006+N8Ty8w+Bw2 feog== 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=thPEhKJXDNsDhznjUQ5v6tVpcUnSjaLQLK/62Jj38gk=; b=U/JdvNmoUuHPRlmaBBOj4XO8gaplSWwrP3puZeWjI4sgxO8Cwhsrwbx1K37x8st8K4 VzZLp1FwEQdyxh6v0IXdHOq+MvNLY72Q32BfgMeUvREes5e4MGW675TpU9QFJWcCPdEe kG3u2nOMD7riwbu7F7kme+B5OImGP74ySy0CKGq7Gk9bSVVon2v6Zhs673j4dapcyJd/ sORHPaV6TRqCwj0Ilzvm6tbwmPAZniQySW6SoXctMlBaqoRSoZr4KLVOWkNIggA1JU5U t7wxG+b9eglVTJCBVdgH9RaGXEEVDTCroxgtGRg1TafDW5Nh0tEuK5IHOL+rI4N/cyGU rjeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NHDcacSw; 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 c7-20020a656747000000b0038225bd6f70si2574566pgu.398.2022.04.12.05.10.03; Tue, 12 Apr 2022 05:10:17 -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=NHDcacSw; 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 S1346880AbiDKOLD (ORCPT + 99 others); Mon, 11 Apr 2022 10:11:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346861AbiDKOLB (ORCPT ); Mon, 11 Apr 2022 10:11:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E631C329B8; Mon, 11 Apr 2022 07:08:47 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 8585761259; Mon, 11 Apr 2022 14:08:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD2E0C385A5; Mon, 11 Apr 2022 14:08:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649686127; bh=SJ4YeANA3X9NeGRCACiLeL5RF0SBq7ZEod7p7S6oEgw=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=NHDcacSw2ejC7GR7NcxKVYjrW5gmzrk+7KUXVjKEyBSnagI7zSwLn/gE6I7QRbRK8 aEY+RqKQwnPkZ3Tcq1tfES01nz4FuM2w8IMwlVNHU/0mpqtBKmZknnAhVSFo5B24D4 39WqKM8ZcCWMjrzEwRAp1nN/3maAUNZVE1MmEfkb+vr7H9P4hCoa5pdJCUtHgKdCOI P0Cr7Px72DAz/51JGRwI6miR4FuY4k89Em2AwDfPmBuZejLgjWNyhY7PsRyv3bMrkj nSzq41sapWapHvrDg+lRxWgPDDcdx9hHkhpHaHdW/c7ZwHJNEPt42PDUErmcjP+L9p x9vrnWcSfecew== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 7E0795C0144; Mon, 11 Apr 2022 07:08:46 -0700 (PDT) Date: Mon, 11 Apr 2022 07:08:46 -0700 From: "Paul E. McKenney" To: Uladzislau Rezki Cc: Joel Fernandes , LKML , Josh Triplett , Lai Jiangshan , Mathieu Desnoyers , rcu , Steven Rostedt , frederic@kernel.org Subject: Re: [PATCH RFC] rcu/nocb: Provide default all-CPUs mask for RCU_NOCB_CPU=y Message-ID: <20220411140846.GA84069@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20220407210734.2548973-1-joel@joelfernandes.org> <20220408142232.GA4285@paulmck-ThinkPad-P17-Gen-1> <20220408155002.GF4285@paulmck-ThinkPad-P17-Gen-1> <20220408174908.GK4285@paulmck-ThinkPad-P17-Gen-1> <20220408205440.GL4285@paulmck-ThinkPad-P17-Gen-1> 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 11:46:15PM +0200, Uladzislau Rezki wrote: > > > > Here is what I believe you are proposing: > > > > > > --- rcu_nocbs rcu_nocbs=??? > > > > CONFIG_RCU_NOCB_CPU_ALL=n [1] [2] [3] > > > > CONFIG_RCU_NOCB_CPU_ALL=y [4] [4] [3] > > > > > > [1] No CPUs are offloaded at boot. CPUs cannot be offloaded at > > runtime. > > > > [2] No CPUs are offloaded at boot, but any CPU can be offloaded > > (and later de-offloaded) at runtime. > > > > [3] The set of CPUs that are offloaded at boot are specified by the > > mask, represented above with "???". The CPUs that are offloaded > > at boot can be de-offloaded and offloaded at runtime. The CPUs > > not offloaded at boot cannot be offloaded at runtime. > > > > [4] All CPUs are offloaded at boot, and any CPU can be de-offloaded > > and offloaded at runtime. This is the same behavior that > > you would currently get with CONFIG_RCU_NOCB_CPU_ALL=n and > > rcu_nocbs=0-N. > > > > > > I am adding Frederic on CC, who will not be shy about correcting any > > confusion I be suffering from have with respect to the current code. > > > > Either way, if this is not what you had in mind, what are you suggesting > > instead? > > > > I believe that Steve Rostedt's review would carry weight for ChromeOS, > > however, I am suffering a senior moment on the right person for Android. > > > We(in Sony) mark all CPUs as offloaded ones because of power reasons. The > energy aware scheduler has a better knowledge where to place an rcuop/x > task to invoke callbacks. The decision is taken based on many reason and > the most important is to drain less power as a result of task placement. > For example, power table, if OPP becomes higher or not, CPU is idle, etc. > > What Joel does in this patch sounds natural to me at least from the first > glance. I mean converting the RCU_NOCB_CPU=y to make all CPUs to do offloading. Just to be very clear, given appropriate acks/reviews, adding something like CONFIG_RCU_NOCB_CPU_ALL to get default rcu_nocbs=0-N is fine. However, Joel's original patch would not be good for the enterprise distros, which rely on the current default. Thanx, Paul