• P
    lib: bitmap: support "N" as an alias for size of bitmap · 2c4885d2
    Paul Gortmaker 提交于
    While this is done for all bitmaps, the original use case in mind was
    for CPU masks and cpulist_parse() as described below.
    
    It seems that a common configuration is to use the 1st couple cores for
    housekeeping tasks.  This tends to leave the remaining ones to form a
    pool of similarly configured cores to take on the real workload of
    interest to the user.
    
    So on machine A - with 32 cores, it could be 0-3 for "system" and then
    4-31 being used in boot args like nohz_full=, or rcu_nocbs= as part of
    setting up the worker pool of CPUs.
    
    But then newer machine B is added, and it has 48 cores, and so while
    the 0-3 part remains unchanged, the pool setup cpu list becomes 4-47.
    
    Multiple deployment becomes easier when we can just simply replace 31
    and 47 with "N" and let the system substitute in the actual number at
    boot; a number that it knows better than we do.
    
    Cc: Yury Norov <yury.norov@gmail.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: "Paul E. McKenney" <paulmck@kernel.org>
    Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Suggested-by: Yury Norov <yury.norov@gmail.com> # move it from CPU code
    Acked-by: NYury Norov <yury.norov@gmail.com>
    Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
    Signed-off-by: NPaul E. McKenney <paulmck@kernel.org>
    2c4885d2
bitmap.c 38.5 KB