Re: [PATCH 6/6] cgroup/cpuset: Don't make a forking task wait for memory migration
From: Tejun Heo
Date: Tue Nov 03 2026 - 10:16:51 EST
Hello,
On Tue, Nov 03, 2026 at 08:59:40PM +1300, Matthew Ruffell wrote:
...
> - task_work_queued is set whenever is_memory_migrate(cs) is true, which
> on cgroup v2 is always, even when cpuset_migrate_mm() queued nothing
> because the nodemasks were equal. The parent then flushes
> cpuset_migrate_mm_wq for no reason of its own.
>
> - cpuset_migrate_mm_wq is a single ordered workqueue, so the flush waits
> for every migration queued by anyone, not just this fork's. systemd
> forks services with CLONE_INTO_CGROUP, and as soon as one slice carries
> a cpuset setting every top-level slice has a cpuset of its own, so PID 1
> blocks in flush_workqueue() on every service start for as long as some
> unrelated cpuset.mems migration takes. On the AWS systems of
> LP: #2165410 that is minutes, during which logind cannot create
> sessions and SSH logins fail.
The end result looks fine to me but can you please separate the two changes
into separate patches? The two changes can't interact with each other, so
the patch as a whole looks puzzling.
Thanks.
--
tejun