Re: [PATCH RFC cpumask 4/5] cpumask: Add "last" alias for cpu list specifications
From: Paul E. McKenney
Date: Thu Jan 07 2021 - 09:48:55 EST
On Thu, Jan 07, 2021 at 03:18:47PM +0100, Peter Zijlstra wrote:
> On Wed, Jan 06, 2021 at 01:16:50PM -0800, Yury Norov wrote:
> > On Wed, Jan 6, 2021 at 1:50 AM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> > > Aside from the comments Yury made, on how all this is better in
> > > bitmap_parselist(), how about doing s/last/N/ here? For me something
> > > like: "4-N" reads much saner than "4-last".
> > >
> > > Also, it might make sense to teach all this about core/node topology,
> > > but that's going to be messy. Imagine something like "Core1-CoreN" or
> > > "Nore1-NodeN" to mean the mask all/{Core,Node}0.
> >
> > If you just want to teach bitmap_parselist() to "s/Core0/0-4", I think
> > it's doable if we add a hook to a proper subsystem in bitmap_parselist().
> >
> > > And that is another feature that seems to be missing from parselist,
> > > all/except.
> >
> > We already support groups in a range. I think it partially covers the
> > proposed all/except.
> >
> > Can you share examples on what you miss?
>
> The obvious one is the "all/Core0" example above, which would be
> equivalent to "Core1-CoreN".
>
> Another case that I don't think we can do today is something like, give
> me SMT0 of each core.
>
> I don't really see the use of the ranges thing, CPU enumeration just
> isn't sane like that. Also, I should really add that randomization pass
> to the CPU enumeration :-)
Please don't!!!
Thanx, Paul