Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp534402pxb; Fri, 15 Apr 2022 05:37:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIFuhGnKVmgZsAd3486xsAw8zG53fzgKPhqBLplxxhGB6TLFQ+fG5ivoIRrNpziXmDm6p5 X-Received: by 2002:aa7:d753:0:b0:41d:732b:f2d2 with SMTP id a19-20020aa7d753000000b0041d732bf2d2mr8183673eds.278.1650026277199; Fri, 15 Apr 2022 05:37:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650026277; cv=none; d=google.com; s=arc-20160816; b=mURIrkJiLjkjOvAj+RhC8alktzXH/ReFzzgxVel3TB3NaEa+5dscy1ezQkWAbuyHxQ SdxcDuS8+/dEgv/aGmHlXronDcvqhaP+ki/k3JSKw+tiLXGGHkgRk0RKpI8MKJ3NXyyw h49v/CTwCMgefocc49N+RFR0DD2WITJ3FrD7xYBRb5ysPkk1mClVq5uhsZtVPcal0dBr 4BlCwxqUEVoGqxHiTpqy9TyXBsR9dcuAF+nTvOSOIQ3gcvMdbb7tLAhIQ4UqIolYFj+r 8lGP+mYBHCZwSzvuJM2FgrYy/Zxp2+GqKDrIrtcxcpiF/0nQC0jnSWtj3ZCpY+LGYfjc zSEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=bvS4UKc1UXDGBX9an4EfNISe6+FbRhkIbjWtPqPFv18=; b=MPsOURFYE5Nm77YYsrIeC87sOqUgMPpQPgx/ViUNQp1et0iDAzw6NUTwFYF+DBd3rK qBFWpqUrkWsXD3UtTl1lsmFPeSMrun3SdtgPg47Gito1TNEO90ExciFNRdOYlPgAAQal FXtjI/LUvHtxH3pb8kPm0pOZS7EInBSxMlJqEWm9yvHsDlHNbNXHTAKFEUoplKJ/Hotg L430Z+TwG3li/XMf/ttGrOm/4zLK/CPKhwpOPwIsivDAiEKbVf4EnpyufcdjDd4G7v7t LcXpvrElo6qIdpGxlMPXGAbKzKJ5bXDjdBPQ1G70zR2d/Jeydz9RlBuHFKJFRv1isB15 BQUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=xB0zOcmw; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jr11-20020a170906a98b00b006e89cc5caf6si972818ejb.852.2022.04.15.05.37.32; Fri, 15 Apr 2022 05:37:57 -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=@joelfernandes.org header.s=google header.b=xB0zOcmw; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345934AbiDNTv5 (ORCPT + 99 others); Thu, 14 Apr 2022 15:51:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345914AbiDNTvy (ORCPT ); Thu, 14 Apr 2022 15:51:54 -0400 Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B53C26F9 for ; Thu, 14 Apr 2022 12:49:28 -0700 (PDT) Received: by mail-io1-xd2b.google.com with SMTP id i196so1143711ioa.1 for ; Thu, 14 Apr 2022 12:49:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bvS4UKc1UXDGBX9an4EfNISe6+FbRhkIbjWtPqPFv18=; b=xB0zOcmw5eHWZ38NbVe/qlAyI4fzr7LrS4U9yAuITELvOPLRxJNAF8j1ZKR7ef2TP0 MUqzEGVdqwQtJ8cN6wfT1jW//Fy1fIu8ubHL9U92BP1MbUix0jPD242Todc4WRPjOquD 3UYP6L12lt67t/ik8TkMNw2tAkyhONFSnrihA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bvS4UKc1UXDGBX9an4EfNISe6+FbRhkIbjWtPqPFv18=; b=oiKyxrKnuVIdkSxdSHLVJsEYM39uxMVPwrPBUFiNnsdPW1t1EL/413z0pxEiuPywR0 chJ6uFXcqzFmff1Dlzh3ayQW92hYcI3L4p2XnVfZXFaxMM/t9lJCA6ewR9aEWfY65T9r 2b2lEUEOJGFAyWPiCODVisy0pOTzxamyxOnLXlN5WEjqV7x+nsaIB6ozb7zrS/kQB5Bg AdIUIX2vkptMsjYoPqcRKCe0DO296oBvdqeL0CfZKnGsmaZ+l9zJcGLPk/VQIMKtvi8Z LYKkU0WYeZh0FHfFga4TGmrzaArY3uXQ7yGKVC1s0bVHJqRfdk4mojyGq+CpsN8dXeKY ggbQ== X-Gm-Message-State: AOAM530BsuzndlX3ssMfothk4Yw299p6pA2MWjY2ffWd2RlhhXGYqALP T1cao4KsId2Kfe+0I+4qZHdD5+3W0S3gravPNH9Mbg== X-Received: by 2002:a5d:8855:0:b0:651:fe8:47a8 with SMTP id t21-20020a5d8855000000b006510fe847a8mr622410ios.84.1649965767824; Thu, 14 Apr 2022 12:49:27 -0700 (PDT) MIME-Version: 1.0 References: <20220408155002.GF4285@paulmck-ThinkPad-P17-Gen-1> <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> In-Reply-To: <20220414194204.GU4285@paulmck-ThinkPad-P17-Gen-1> From: Joel Fernandes Date: Thu, 14 Apr 2022 15:49:16 -0400 Message-ID: Subject: Re: [PATCH RFC] rcu/nocb: Provide default all-CPUs mask for RCU_NOCB_CPU=y To: "Paul E. McKenney" Cc: LKML , Josh Triplett , Lai Jiangshan , Mathieu Desnoyers , rcu , Steven Rostedt , Frederic Weisbecker Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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 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? 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