From: Valentin Schneider <valentin.schneider@arm.com>
To: Frederic Weisbecker <frederic@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Frederic Weisbecker <frederic@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
"Paul E . McKenney" <paulmck@kernel.org>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Yejune Deng <yejune.deng@gmail.com>
Subject: Re: [PATCH] sched: Fix PF_NO_SETAFFINITY blind inheritance
Date: Wed, 26 May 2021 11:10:07 +0100 [thread overview]
Message-ID: <87a6ohhklc.mognet@arm.com> (raw)
In-Reply-To: <20210525235849.441842-1-frederic@kernel.org>
Hi Frederic,
Sorry about that one; thanks for having dug into it.
On 26/05/21 01:58, Frederic Weisbecker wrote:
> One way to solve the PF_NO_SETAFFINITY issue is to not inherit this flag
> on copy_process() at all. The cases where it matters are:
>
> * fork_idle(): explicitly set the flag already.
> * fork() syscalls: userspace tasks that shouldn't be concerned by that.
> * create_io_thread(): the callers explicitly attribute the flag to the
> newly created tasks.
> * kernel_thread():
> _ Fix the issues on init/1 and kthreadd
> _ Fix the issues on kthreadd children.
> _ Usermode helper created by an unbound workqueue. This shouldn't
> matter. In the worst case it gives more control to userspace
> on setting affinity to these short living tasks although this can
> be tuned with inherited unbound workqueues affinity already.
>
(I just saw it got shoved into tip already, but in any case:)
That makes sense to me. Regarding the UMH point, I don't believe there are
others like it creeping around; otherwise we might've had to go with e.g.
p->flags &= ~(... | (PF_NO_SETAFFINITY * !!(p->flags & PF_IDLE)))
but per the above that doesn't seem necessary.
Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
prev parent reply other threads:[~2021-05-26 10:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-25 23:58 [PATCH] sched: Fix PF_NO_SETAFFINITY blind inheritance Frederic Weisbecker
2021-05-26 7:16 ` [tip: sched/core] sched: Stop PF_NO_SETAFFINITY from being inherited by various init system threads tip-bot2 for Frederic Weisbecker
2021-05-26 10:10 ` Valentin Schneider [this message]
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=87a6ohhklc.mognet@arm.com \
--to=valentin.schneider@arm.com \
--cc=bristot@redhat.com \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=yejune.deng@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.