Re: [PATCH 1/2] bitmap_parse: support 'all' semantics

From: Paul Gortmaker
Date: Wed Apr 21 2021 - 19:45:46 EST


[Re: [PATCH 1/2] bitmap_parse: support 'all' semantics] On 21/04/2021 (Wed 11:19) Steven Rostedt wrote:

> On Tue, 20 Apr 2021 20:13:25 -0700
> Yury Norov <yury.norov@xxxxxxxxx> wrote:
>
> > @@ -76,6 +76,11 @@ to change, such as less cores in the CPU list, then N and any ranges using N
> > will also change. Use the same on a small 4 core system, and "16-N" becomes
> > "16-3" and now the same boot input will be flagged as invalid (start > end).
> >
> > +The special case-tolerant group name "all" has a meaning of selecting all CPUs,
> > +such that "isolcpus=all" is the equivalent of "isolcpus=0-N".
>
> I'm OK with the concept of this patch set, but really? That is a horrible
> example. One should NEVER set isolcpus to all!

It wouldn't have parsed anyways. The "isolcpus=" would just think "all" was
an unsupported flag and discard it before it ever got to cpu/bitmap
processing. See 3662daf02350 "sched/isolation: Allow "isolcpus=" to
skip unknown sub-parameters".

The use case example Paul chose (not me; the smart Paul) is better.

Paul.
--

>
> -- Steve
>
>
> > +
> > +The semantics of "N" and "all" is supported on a level of bitmaps and holds for
> > +all users of bitmap_parse().
> >