From: Tejun Heo <tj@kernel.org>
To: Joel Savitz <jsavitz@redhat.com>
Cc: linux-kernel@vger.kernel.org, "Li Zefan" <lizefan@huawei.com>,
"Phil Auld" <pauld@redhat.com>,
"Waiman Long" <longman@redhat.com>,
"Michal Koutný" <mkoutny@suse.com>,
cgroups@vger.kernel.org
Subject: Re: [PATCH v3] cpuset: restore sanity to cpuset_cpus_allowed_fallback()
Date: Wed, 12 Jun 2019 08:38:57 -0700 [thread overview]
Message-ID: <20190612153857.GO3341036@devbig004.ftw2.facebook.com> (raw)
In-Reply-To: <1560352395-19977-1-git-send-email-jsavitz@redhat.com>
Hello, Joel.
On Wed, Jun 12, 2019 at 11:13:15AM -0400, Joel Savitz wrote:
> In the case that a process is constrained by taskset(1) (i.e.
> sched_setaffinity(2)) to a subset of available cpus, and all of those are
> subsequently offlined, the scheduler will set tsk->cpus_allowed to
> the current value of task_cs(tsk)->effective_cpus.
>
> This is done via a call to do_set_cpus_allowed() in the context of
> cpuset_cpus_allowed_fallback() made by the scheduler when this case is
> detected. This is the only call made to cpuset_cpus_allowed_fallback()
> in the latest mainline kernel.
>
> However, this is not sane behavior.
So, I fully agree the whole thing is insane. It has always been so
and the root cause of the problem is that we aren't distinguishing
restrictions put on by the cpuset and individual tasks' configured
cpumask. Ultimately, for this to make actual sense, we need to
separate out per-task effective and configured and cpuset-imposed
masks.
That said, the suggested behavior seems way better than the current
one, so no objection from me, but can you please repost w/ scheduler
ppl cc'd?
Thanks.
--
tejun
prev parent reply other threads:[~2019-06-12 15:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-12 15:13 Joel Savitz
2019-06-12 15:38 ` Tejun Heo [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=20190612153857.GO3341036@devbig004.ftw2.facebook.com \
--to=tj@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=jsavitz@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=longman@redhat.com \
--cc=mkoutny@suse.com \
--cc=pauld@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome