From: Frederic Weisbecker <frederic@kernel.org>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: linux-kernel@vger.kernel.org, Phil Auld <pauld@redhat.com>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] Revert "isolcpus: Affine unbound kernel threads to housekeeping cpus"
Date: Fri, 7 May 2021 22:16:00 +0200 [thread overview]
Message-ID: <20210507201600.GA66223@lothringen> (raw)
In-Reply-To: <20210507165710.GA429056@fuller.cnet>
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.
next prev parent reply other threads:[~2021-05-07 20:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-07 16:57 [PATCH] Revert "isolcpus: Affine unbound kernel threads to housekeeping cpus" Marcelo Tosatti
2021-05-07 20:16 ` Frederic Weisbecker [this message]
2021-05-07 22:09 ` Marcelo Tosatti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210507201600.GA66223@lothringen \
--to=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=pauld@redhat.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox