From: Valentin Schneider <vschneid@redhat.com>
To: "Waiman Long" <longman@redhat.com>, "Michal Koutný" <mkoutny@suse.com>
Cc: Tejun Heo <tj@kernel.org>, Zefan Li <lizefan.x@bytedance.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
Shuah Khan <shuah@kernel.org>,
linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
linux-pm@vger.kernel.org, linux-kselftest@vger.kernel.org,
Frederic Weisbecker <frederic@kernel.org>,
"Paul E. McKenney" <paulmck@kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Anna-Maria Behnsen <anna-maria@linutronix.de>,
Alex Shi <alexs@kernel.org>,
Vincent Guittot <vincent.guittot@linaro.org>,
Barry Song <song.bao.hua@hisilicon.com>
Subject: Re: [PATCH 1/2] cgroup/cpuset: Make cpuset hotplug processing synchronous
Date: Wed, 03 Apr 2024 18:17:25 +0200 [thread overview]
Message-ID: <xhsmh8r1ubeui.mognet@vschneid-thinkpadt14sgen2i.remote.csb> (raw)
In-Reply-To: <620d1b70-cfbc-4b76-ad04-b3be559afd56@redhat.com>
On 03/04/24 10:47, Waiman Long wrote:
> On 4/3/24 10:26, Valentin Schneider wrote:
>> IIUC that was Thomas' suggestion [1], but I can't tell yet how bad it would
>> be to change cgroup_lock() to also do a cpus_read_lock().
>
> Changing the locking order is certainly doable. I have taken a cursory
> look at it and at least the following files need to be changed:
>
> kernel/bpf/cgroup.c
> kernel/cgroup/cgroup.c
> kernel/cgroup/legacy_freezer.c
> mm/memcontrol.c
>
> That requires a lot more testing to make sure that there won't be a
> regression. Given that the call to cgroup_transfer_tasks() should be
> rare these days as it will only apply in the case of cgroup v1 under
> certain condtion, I am not sure this requirement justifies making such
> extensive changes. So I kind of defer it until we reach a consensus that
> it is the right thing to do.
>
Yeah if we can avoid it initially I'd be up for it.
Just one thing that came to mind - there's no flushing of the
cpuset_migrate_tasks_workfn() work, so the scheduler might move tasks
itself before the cpuset does via:
balance_push() ->__balance_push_cpu_stop() -> select_fallback_rq()
But, given the current placement of cpuset_wait_for_hotplug(), I believe
that's something we can already have, so we should be good.
> Cheers,
> Longman
next prev parent reply other threads:[~2024-04-03 16:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-01 14:58 [PATCH 0/2] cgroup/cpuset: Make cpuset hotplug processing synchronous Waiman Long
2024-04-01 14:58 ` [PATCH 1/2] " Waiman Long
2024-04-02 14:13 ` Michal Koutný
2024-04-02 15:30 ` Waiman Long
2024-04-03 12:02 ` Michal Koutný
2024-04-03 13:38 ` Waiman Long
2024-04-03 14:26 ` Valentin Schneider
2024-04-03 14:47 ` Waiman Long
2024-04-03 14:56 ` Michal Koutný
2024-04-03 15:10 ` Waiman Long
2024-04-03 16:17 ` Valentin Schneider [this message]
2024-04-03 14:54 ` Michal Koutný
2024-04-03 16:02 ` Valentin Schneider
2024-04-01 14:58 ` [PATCH 2/2] cgroup/cpuset: Add test_cpuset_v1_hp.sh Waiman Long
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=xhsmh8r1ubeui.mognet@vschneid-thinkpadt14sgen2i.remote.csb \
--to=vschneid@redhat.com \
--cc=alexs@kernel.org \
--cc=anna-maria@linutronix.de \
--cc=cgroups@vger.kernel.org \
--cc=frederic@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=longman@redhat.com \
--cc=mingo@kernel.org \
--cc=mkoutny@suse.com \
--cc=paulmck@kernel.org \
--cc=pavel@ucw.cz \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=shuah@kernel.org \
--cc=song.bao.hua@hisilicon.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=vincent.guittot@linaro.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).