The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v3 0/2] cgroup/cpuset: fix DL attach accounting
@ 2026-05-09 10:20 Guopeng Zhang
  2026-05-09 10:20 ` [PATCH v3 1/2] cgroup/cpuset: reset DL migration state on can_attach() failure Guopeng Zhang
  2026-05-09 10:20 ` [PATCH v3 2/2] cgroup/cpuset: reserve DL bandwidth only for root-domain moves Guopeng Zhang
  0 siblings, 2 replies; 10+ messages in thread
From: Guopeng Zhang @ 2026-05-09 10:20 UTC (permalink / raw)
  To: Waiman Long, Tejun Heo, Michal Koutný, Ingo Molnar,
	Peter Zijlstra, Juri Lelli, Chen Ridong
  Cc: Johannes Weiner, Vincent Guittot, Dietmar Eggemann,
	Steven Rostedt, Ben Segall, Mel Gorman, Valentin Schneider,
	K Prateek Nayak, Gabriele Monaco, Will Deacon, linux-kernel,
	cgroups, Guopeng Zhang

Hi,

This v3 series contains two cpuset fixes for SCHED_DEADLINE attach
accounting.

Patch 1 fixes an internal cpuset_can_attach() failure path where
temporary DL migration state can be left behind if a later per-task
check fails before cpuset marks attach_in_progress.

Patch 2 keeps cpuset DL bandwidth reservation aligned with the condition
used by set_cpus_allowed_dl() for source-side bandwidth removal. It keeps
counting all migrating DL tasks for cpuset task accounting, but reserves
destination DL bandwidth only for tasks that actually need a root-domain
bandwidth move.

Guopeng Zhang (2):
  cgroup/cpuset: reset DL migration state on can_attach() failure
  cgroup/cpuset: reserve DL bandwidth only for root-domain moves

 include/linux/sched/deadline.h  |  9 ++++++++
 kernel/cgroup/cpuset-internal.h |  1 +
 kernel/cgroup/cpuset.c          | 39 ++++++++++++++++++---------------
 kernel/sched/deadline.c         | 13 ++++++++---
 4 files changed, 41 insertions(+), 21 deletions(-)

---
Changes in v3:
- Patch 1: use common ret != 0 cleanup in cpuset_can_attach(), as
  suggested by Waiman Long and Chen Ridong.
- Patch 2: drop task_cpu_possible_mask() / attach-target-mask handling
  as suggested by Waiman Long.
- Patch 2: keep the change limited to reserving DL bandwidth only for
  tasks that need a root-domain bandwidth move.
- Leave the broader can_attach()/attach() transaction model unchanged.

Changes in v2:
- Split the original change into two patches.
- Add a separate fix for resetting pending DL migration state on
  cpuset_can_attach() failure.
- Clarify that nr_migrate_dl_tasks counts all migrating DL tasks for
  cpuset task accounting, while sum_migrate_dl_bw only tracks bandwidth
  needing destination root-domain reservation.

v2:
  https://lore.kernel.org/all/20260507103310.35849-1-zhangguopeng@kylinos.cn/

v1:
  https://lore.kernel.org/all/20260421083449.95750-1-zhangguopeng@kylinos.cn

-- 
2.43.0

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-05-11 20:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-09 10:20 [PATCH v3 0/2] cgroup/cpuset: fix DL attach accounting Guopeng Zhang
2026-05-09 10:20 ` [PATCH v3 1/2] cgroup/cpuset: reset DL migration state on can_attach() failure Guopeng Zhang
2026-05-11  2:48   ` Chen Ridong
2026-05-11  5:04   ` Waiman Long
2026-05-11  8:18   ` Tejun Heo
2026-05-11  9:17   ` Juri Lelli
2026-05-09 10:20 ` [PATCH v3 2/2] cgroup/cpuset: reserve DL bandwidth only for root-domain moves Guopeng Zhang
2026-05-11  9:17   ` Juri Lelli
2026-05-11 20:00   ` Waiman Long
2026-05-11 20:29   ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox