[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210507201600.GA66223@lothringen>
Date: Fri, 7 May 2021 22:16:00 +0200
From: Frederic Weisbecker <frederic@...nel.org>
To: Marcelo Tosatti <mtosatti@...hat.com>
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 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.
Powered by blists - more mailing lists