Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1736006pxb; Wed, 10 Feb 2021 15:54:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJz6WzzQncndanIFH0UJoRC1r6Z6dgSWaUGP37lfOUea2FQOBZtdEd+DK1OZgdAbz1yomUyF X-Received: by 2002:a17:906:d8b5:: with SMTP id qc21mr5229401ejb.62.1613001262444; Wed, 10 Feb 2021 15:54:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613001262; cv=none; d=google.com; s=arc-20160816; b=gGCCnzmSbAczKTsaR/rouIdMg+glBuWLli+PvxUGYKySSlKEU+VV8NZhYnBU7Fsrkq HhXO4FJr4pNn8U2ojqbwWV/GLCjh8rd+HDktK6BuUZ2lgB2Cm3uBWSBlgoMtQRSzaWAy zCpDzxReia8bLl7/X6iIh9HjlkRF/aWmrJxBStzX00VusnAo0bhHJIfWdX18Ok5dwHYz s2Vsh0cbPJer0CShhRm3qlH90ni6pj/q/WMnyKjIxQWa+FPnfygvYkVgpKjb1+0rVBuB QOV6XxHjAzBP53Zd2Pl5Fdlu0W53vdKVIF91aZzHWawdLeoEWFaKjwcvXB1tEV98+ghx WMLQ== 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=lCi9XXUP0cQtrx8jhRDhF39o9rKH5GcFdbD18whEmTY=; b=vBTjQ0h2xzomofxh/5K0xdpYI9RCXfD87hHFhuqfiShUGxp0va4RWzXvpim5FRRJEq mSd8i8JHEqNQiVrh30ai85GetOQndJyCwueADAbrGpzii0DK+xEm1ZdfWTivZEaUvXmh aOMQPlXWGFMCURzV+ll8uTbspW5SoHV9iH17U6A77v8OZloBz8g+Zjt3+6VvQfiefHWv S5XxKs60csXjNSeGUKpURXpGHaxdpYWl+ODF5aW/CQ7942utZdVik1oStS7e0KWuB0e2 SGIrNEk/rm7lWDS9hKhZocRicYjE083XnR0p5FCaTIbfDJm1l7i/tqkZRNfOP5c6/YcR TDyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qyM5iwvE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z9si2480509ejm.194.2021.02.10.15.53.58; Wed, 10 Feb 2021 15:54:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qyM5iwvE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233820AbhBJXvH (ORCPT + 99 others); Wed, 10 Feb 2021 18:51:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232565AbhBJXu7 (ORCPT ); Wed, 10 Feb 2021 18:50:59 -0500 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3475AC06174A for ; Wed, 10 Feb 2021 15:50:19 -0800 (PST) Received: by mail-io1-xd29.google.com with SMTP id u8so3843057ior.13 for ; Wed, 10 Feb 2021 15:50:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lCi9XXUP0cQtrx8jhRDhF39o9rKH5GcFdbD18whEmTY=; b=qyM5iwvEkM/Ws4/4PC10L33v7tv+bcrXDwr2/b/Th/Y7V/fMnQLWoeCTFAu5CvuiNI CWE4ieY930AZm9LH2J0DPfFZv1FZRx7hQOaIwJ2o1/1Waqshu+fT8I9PnKlajv1NbLpK UOOMmIw63uOAdW3z1/UNj0c4weP16JRwRDqMmhdukY3d8V5rCM4ZS1FLHzrQL1NelvpN GsOumhcFkzf3Sy5Vp9yzSVUOVhF6/pxmeO5d4WuGeFd5XUFBySp6Co212IjoZ9dnI6Wx GCg7alqByRIgFFDLzgZAzeZ9Z7IpHEhMXjXA568bdRNcZ7RNjMpctYEl+LTqLleefiRF vuyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lCi9XXUP0cQtrx8jhRDhF39o9rKH5GcFdbD18whEmTY=; b=fVwD5cPf1zbJQVpM72slXmz4buVnuyOmf3BaXIVplR2wOCSqXHF+r5+/eyPX099jXZ ejU6xpTkf14nPqLuBpcWNdEn9uKh55Fb5LUVUqkDPNPn3q+/YRIN8SI/SAi7k1gwGbcp gsmrgkZcnZsYzdwsdhTXOM4w02ObP5M/PyEjO9Z7Jnd74n+mpJFrh3cPEAh48Ka3x5gM MXv+h8KT/n2065ZLpTCZZmoUjyyD2pM0m5aArAfXM2mu5KrRdozgSNHtwTnrk/5kkoXf ZqoSa7JYZaBhySpJWmPFWSw9ZmNURPoeGSMxCIItx/v6O7xNWzWoiVkMYNpBzXXsKW6X +T6Q== X-Gm-Message-State: AOAM532+bnfTgmdsgT5g0Aw3VIMe+8Jm1PD3K8IuC0JZx2nSDkZypuTV mOx6snORIF0VnJEjzz1mqu5A8MflC5J6kYgzpHk= X-Received: by 2002:a02:cd37:: with SMTP id h23mr5825957jaq.29.1613001018569; Wed, 10 Feb 2021 15:50:18 -0800 (PST) MIME-Version: 1.0 References: <20210209225907.78405-1-paul.gortmaker@windriver.com> <20210210175751.GH2743@paulmck-ThinkPad-P72> In-Reply-To: <20210210175751.GH2743@paulmck-ThinkPad-P72> From: Yury Norov Date: Wed, 10 Feb 2021 15:50:07 -0800 Message-ID: Subject: Re: [PATCH v4 0/8] support for bitmap (and hence CPU) list "N" abbreviation To: "Paul E. McKenney" Cc: Andy Shevchenko , Paul Gortmaker , Linux Kernel Mailing List , Li Zefan , Ingo Molnar , Thomas Gleixner , Josh Triplett , Peter Zijlstra , Frederic Weisbecker , Rasmus Villemoes Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 10, 2021 at 9:57 AM Paul E. McKenney wrote: > > On Wed, Feb 10, 2021 at 06:26:54PM +0200, Andy Shevchenko wrote: > > On Tue, Feb 09, 2021 at 05:58:59PM -0500, Paul Gortmaker wrote: > > > The basic objective here was to add support for "nohz_full=8-N" and/or > > > "rcu_nocbs="4-N" -- essentially introduce "N" as a portable reference > > > to the last core, evaluated at boot for anything using a CPU list. > > > > I thought we kinda agreed that N is confusing and L is better. > > N to me is equal to 32 on 32 core system as *number of cores / CPUs*. While L > > sounds better as *last available CPU number*. > > The advantage of "N" is that people will automatically recognize it as > "last thing" or number of things" because "N" has long been used in > both senses. In contrast, someone seeing "0-L" for the first time is > likely to go "What???". > > Besides, why would someone interpret "N" as "number of CPUs" when doing > that almost always gets you an invalid CPU number? > > Thanx, Paul I have no strong opinion about a letter, but I like Andy's idea to make it case-insensitive. There is another comment from the previous iteration not addressed so far. This idea of the N notation is to make the bitmap list interface more robust when we share the configs between different machines. What we have now is definitely a good thing, but not completely portable except for cases 'N', '0-N' and 'N-N'. For example, if one user adds rcu_nocbs= '4-N', and it works perfectly fine for him, another user with s NR_CPUS == 2 will fail to boot with such a config. This is not a problem of course in case of absolute values because nobody guaranteed robustness. But this N feature would be barely useful in practice, except for 'N', '0-N' and 'N-N' as I mentioned before, because there's always a chance to end up with a broken config. We can improve on robustness a lot if we take care about this case.For me, the more reliable interface would look like this: 1. chunks without N work as before. 2. if 'a-N' is passed where a>=N, we drop chunk and print warning message 3. if 'a-N' is passed where a>=N together with a control key, we set last bit and print warning. For example, on 2-core CPU: "4-2" --> error "4-4" --> error "4-N" --> drop and warn "X, 4-N" --> set last bit and warn Any comments?