lkml.org 
[lkml]   [2021]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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, &param);
> - 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.

\
 
 \ /
  Last update: 2021-05-07 22:17    [W:0.049 / U:0.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site