Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1030481pxb; Fri, 15 Apr 2022 18:57:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxe7eaRHHMXBOH0D0ixk4/FI3r4HN2NprL8WLQdTA1NMBYjXdnPAXtoLhRZVJKHk4H5dQnL X-Received: by 2002:a63:78ca:0:b0:398:ae5:6515 with SMTP id t193-20020a6378ca000000b003980ae56515mr1316693pgc.345.1650074235490; Fri, 15 Apr 2022 18:57:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650074235; cv=none; d=google.com; s=arc-20160816; b=rD0m1zmO4Y+q+AJlXieK46Jwl7AN5tZZuKpoMmY7ZBJ+JxXy/lAw7FjrPWn33TcxUA FCClgmPp9lY2eHznBMyAiyaH/e4W9o9WD22ob9zf3ID6FBc2OvzUIe+N5TDnhqBgLkfT cx8487xgx89ZfWtW//0ZFtdBitwkdhGdwDyWWRkBnme/OyBN33x4z6iwI03kKOB68/9p sU6yqOnJPQ8/xStnZ8QCJjfsezpazuOcxhZ3Qky5go70UZKUISkDTQ7opKsUp/gcVGkk KRrQuuIU5AmezozCj7cWNCP7rckuZjscV+MtfkhcEOnyUEURTKfP7QUBY8Bw6BzsDug+ szkQ== 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=f1+cBZ4vuKQ4NuRez7E9G5CcduJmzFm7mq3IFVenNFA=; b=jf/xg0TFkkQIf3CEtBYcR8YaETX5zZTF0avxA23kBZ8cW9pvoojA1cFvlQ3it/QK1Z dDBMAaL3sIb95QoHesnY1Mm1SsOWB1+07046WkbMi0TXfHezfsWoCIDFERp7hyqmwQTg IqUQGb3SMZH/9R6R/djmTIFYtssa0G1hO1xhj9WLqj4QsUefPabGcjILcbfCmnBpfesy 8Y0wGrmf2gMx5T1c1RWYA5XxQhB5ZuydU3In4tdGAG5Fbss60zpo/DO4UTWi2uiNY8ws OdZ74cjM3AgVcRWXtg5EjwBoJsToewQV1dqCaB8k/UzeOLv96zawLUhdiFhNZ0UyEh0X HlKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nVJkAqFk; 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 l63-20020a639142000000b0039919e96afdsi2896826pge.455.2022.04.15.18.57.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 18:57:15 -0700 (PDT) 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=nVJkAqFk; 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 6E87919CCDA; Fri, 15 Apr 2022 18:17:39 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346806AbiDNVMf (ORCPT + 99 others); Thu, 14 Apr 2022 17:12:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346799AbiDNVMd (ORCPT ); Thu, 14 Apr 2022 17:12:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 171CF62A3A; Thu, 14 Apr 2022 14:10:06 -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 92A4261FBC; Thu, 14 Apr 2022 21:10:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EEC85C385A5; Thu, 14 Apr 2022 21:10:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649970605; bh=tfMsYagwtq0NhrnrtHFVy+YRVYRjNKvi4tiYz8ThGaE=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=nVJkAqFkX4dbAf73bYDGIeREZF4wDBTmOVAaIR/gAVlFPf29kjAFV4Nptx5wxdeZc /AXheP4y8t7tGcxSgdG6EBQen3zuMrgGKaPwCQoPh3mbBVnLPxcFAp6QuiNDV5Murs HqmgAtHMJjlrJhrflAsm3RkQw1FEqV6DwwgL3WRwukg013RrKxqoHDc1I1ixXtr7FN GbeiIRIVC28g0pS6HmZdf5+JDMwYm+GRsvJRGzBNGy7BiifaTJAhovoPWVBGmP6G/D +oEoSI2cuBzh5tI1J+C3tpsyje7Z2rhpcxgJOr1l3Bn/85X1KjF3THdV5ybPX+KoMl IaL2fQlVViTRg== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 998BA5C03A5; Thu, 14 Apr 2022 14:10:04 -0700 (PDT) Date: Thu, 14 Apr 2022 14:10:04 -0700 From: "Paul E. McKenney" To: Joel Fernandes Cc: LKML , Josh Triplett , Lai Jiangshan , Mathieu Desnoyers , rcu , Steven Rostedt , Frederic Weisbecker Subject: Re: [PATCH RFC] rcu/nocb: Provide default all-CPUs mask for RCU_NOCB_CPU=y Message-ID: <20220414211004.GX4285@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <20220408174908.GK4285@paulmck-ThinkPad-P17-Gen-1> <20220408205440.GL4285@paulmck-ThinkPad-P17-Gen-1> <20220411154109.GX4285@paulmck-ThinkPad-P17-Gen-1> <20220414194204.GU4285@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=-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 On Thu, Apr 14, 2022 at 03:51:29PM -0400, Joel Fernandes wrote: > On Thu, Apr 14, 2022 at 3:49 PM Joel Fernandes wrote: > > > > On Thu, Apr 14, 2022 at 3:42 PM Paul E. McKenney wrote: > > > > > > On Thu, Apr 14, 2022 at 07:19:48PM +0000, Joel Fernandes wrote: > > > > On Mon, Apr 11, 2022 at 08:41:09AM -0700, Paul E. McKenney wrote: > > > > [..] > > > > > > > [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. > > > > > > > > > > > > Yes, this is the behavior I intend. So then there would not be a need > > > > > > to pass a mask (and I suspect for a large number of users, it > > > > > > simplifies boot params). > > > > > > > > > > Very good, and from what I can see, this should work for everyone. > > > > > > > > Just to clarify, what I am going to do is, if this new option =y, then > > > > rcu_nocbs effectively wont do anything. i.e. All CPUs are offloaded at boot. > > > > Let me know if we are not on the same page about it though. I do feel that is > > > > a sensible choice given =y. If we are on same page, please ignore my comment. > > > > > > I was assuming that the rcu_nocbs=??? for non-empty "???" would override > > > the CONFIG_RCU_NOCB_CPU_ALL=y. If you choose not to do that, shouldn't > > > you at least issue some sort of diagnostic? After all, the sysadmin > > > gave a kernel-boot parameter asking the code to do something and the > > > code is choosing not to do that something. > > > > > > Of course, such a sysadmin might want the CONFIG_RCU_NOCB_CPU_ALL=y > > > Kconfig option to affect only the default, that is, when no rcu_nocbs > > > kernel boot parameter is specified. This would change the second "[4]" > > > in my original table to "[2]". > > > > > > Thoughts? > > > > I thought about that. I feel that since we are defaulting the new > > config option to =n , it is a conscious choice by the distro to set it > > to =y. In such a case, they should be Ok with offloading all CPUs. If > > they decide to selectively offload some CPUs in the future, then they > > could revisit the config option at that time. > > > > I feel the kernel config should override the boot parameter behavior. > > It is the same effect as a sysadmin passing kernel parameter X > > assuming the kernel does something but the CONFIG option might not > > even build code corresponding to X. > > > > I feel to address your concern, we can document in kernel command line > > documentation that rcu_nocbs= does not have an effect if > > CONFIG_RCU_NOCB_CPU_ALL=y, would that work for you? > > Along with documentation, I like your idea of printing a diagnostic in > such a situation. I will certainly do that. Seriously. Take some time. Think carefully about it. Thanx, Paul > Thanks, > > - Joel > > > > > Thanks, > > > > - Joel > > > > > > > > > > > > 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. > > > > > > > > > > > > I think for Android, Kalesh Singh is in the kernel team and Tim Murray > > > > > > is the performance lead. They could appropriately represent their RCU > > > > > > needs. > > > > > > > > > > Sounds good! Please collect a Reviewed-by from one or both of them. > > > > > > > > Ok. > > > > > > Thanx, Paul