[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210507220912.GB449495@fuller.cnet>
Date: Fri, 7 May 2021 19:09:12 -0300
From: Marcelo Tosatti <mtosatti@...hat.com>
To: Frederic Weisbecker <frederic@...nel.org>
Cc: linux-kernel@...r.kernel.org, Phil Auld <pauld@...hat.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH] Revert "isolcpus: Affine unbound kernel threads to
housekeeping cpus"
On Fri, May 07, 2021 at 10:16:00PM +0200, Frederic Weisbecker wrote:
> On Fri, May 07, 2021 at 01:57:10PM -0300, Marcelo Tosatti wrote:
> >
> >
> > commit 9cc5b8656892a72438ee7deb introduced a new housekeeping flag,
> > HK_FLAG_KTHREAD, that when enabled sets the CPU affinity for the
> > kthreadd process (therefore all unbounded kernel threads created
> > from that point on will use the housekeeping cpumask).
> >
> > This is not necessary, since its possible to control placement of
> > kthreadd from userspace:
> >
> > # taskset -c -p 0 `pgrep kthreadd`
> > pid 2's current affinity list: 1
> > pid 2's new affinity list: 0
> >
> > Unbounded kernel threads started from that point on will inherit
> > the kthreadd cpumask.
>
> Hmm, but look below:
>
> > @@ -405,8 +404,7 @@ struct task_struct *__kthread_create_on_
> > * The kernel thread should not inherit these properties.
> > */
> > sched_setscheduler_nocheck(task, SCHED_NORMAL, ¶m);
> > - set_cpus_allowed_ptr(task,
> > - housekeeping_cpumask(HK_FLAG_KTHREAD));
> > + set_cpus_allowed_ptr(task, cpu_possible_mask);
>
> That inheritance is then overriden, right?
>
> Thanks.
Hi Frederic,
Doh, yes, ignore me.
Powered by blists - more mailing lists