Re: [patch 2/3] isolcpus: affine kernel threads to specified cpumask

From: Frederic Weisbecker
Date: Tue Mar 31 2020 - 09:36:42 EST


On Tue, Mar 31, 2020 at 08:50:14AM -0300, Marcelo Tosatti wrote:
> On Tue, Mar 31, 2020 at 02:57:08AM +0200, Frederic Weisbecker wrote:
> > On Sat, Mar 28, 2020 at 12:21:19PM -0300, Marcelo Tosatti wrote:
> Hi Frederic,
>
> > So, what about what I suggested with having "unbound" instead, which
> > includes all the CPU-unbound work?
> >
> > HK_FLAG_WQ | HK_FLAG_TIMER | HK_FLAG_RCU | HK_FLAG_MISC | HK_FLAG_KTHREAD | HK_FLAG_SCHED
>
> After more thought, it would share certain flags with nohz_full=, which
> seemed confusing.

In fact I think we should also add HK_FLAG_KTHREAD | HK_FLAG_SCHED to nohz_full=

nohz_full is merely just a shortcut to isolate the tick and the unbound works anyway.

>
> > (and yes your suggestion of including HK_FLAG_SCHED is good).
> >
> > Because I don't see the point of exposing kthread isolation alone as an ABI
> > so far.
> >
> > Later I suspect I'll turn all these flags into a single HK_FLAG_UNBOUND.
>
> How about keeping the flags separate, and then on top of that do
> an "unbound" flag (less typing needed).
>
> This would allow users to combine the individual flags (again, useful
> for debugging) while at the same time having an option which groups
> all the others?


Well, I'd rather not expose all the individual bits to the user. They rely
on kernel implementation details that shouldn't be much useful to the user.

As for internal kernel use, not sure this will ease debugging...

Thanks.