mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCHSET v2 sched_ext/for-7.4] sched_ext: Add ops.sub_child_ecaps_updated()
@ 2026-10-08  9:32 Tejun Heo
  2026-10-08  9:32 ` [PATCH 1/2] sched_ext: Add ops.sub_child_ecaps_updated() to report a child's effective cap changes Tejun Heo
  2026-10-08  9:32 ` [PATCH 2/2] sched_ext: scx_qmap: Reset a child's cpuperf targets once its PERF revoke takes effect Tejun Heo
  0 siblings, 2 replies; 4+ messages in thread
From: Tejun Heo @ 2026-10-08  9:32 UTC (permalink / raw)
  To: sched-ext
  Cc: David Vernet, Andrea Righi, Changwoo Min, Emil Tsalapatis,
	David Dai, linux-kernel, Tejun Heo

Hello,

v2: - A sub's disable no longer reports. The report ran the op outside the
      dispatch path, which meant setting up that path's context for the op's
      kfuncs and gating the nested sub dispatch at runtime, and keeping the
      report clear of the PM bypass took a lock that could stall a suspend.
      The parent knows what it delegated, so ops.sub_detach() is where it
      restores it, and its kerneldoc now says so (#1).
    - scx_qmap resets a detaching child's cids from ops.sub_detach() (#2).

v1: https://lore.kernel.org/r/20261008000352.1689057-1-tj@kernel.org

A grant or revoke only records the target caps. They take effect on a cid at
its next dispatch, and nothing tells the parent when. Without that the
parent cannot act on a revoke, such as resetting the cpuperf target a child
left on the cid.

Patch 1 adds ops.sub_child_ecaps_updated(), delivered to the direct parent
right after the child's own ops.sub_ecaps_updated(), with the child's cgroup
id and the same before and after caps. A sub's disable reports nothing; the
parent restores what it delegated from ops.sub_detach(). Patch 2 makes
scx_qmap reset a child's cpuperf target once its PERF revoke takes effect,
and from sub_detach() for a detaching child.

Based on sched_ext/for-7.4 (3d7c2f550eef).

This patchset contains the following 2 patches.

 0001 sched_ext: Add ops.sub_child_ecaps_updated() to report a child's effective cap changes
 0002 sched_ext: scx_qmap: Reset a child's cpuperf targets once its PERF revoke takes effect

The patchset is also available in the following git branch:

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git sub-child-ecaps-v2

diffstat follows. Thanks.

 kernel/sched/ext/ext.c         |  4 +++
 kernel/sched/ext/internal.h    | 30 ++++++++++++++++++---
 kernel/sched/ext/sub.c         | 59 +++++++++++++++++++++++++++++-------------
 tools/sched_ext/scx_qmap.bpf.c | 33 +++++++++++++++++++++--
 tools/sched_ext/scx_qmap.c     |  7 +++--
 tools/sched_ext/scx_qmap.h     |  1 +
 6 files changed, 109 insertions(+), 25 deletions(-)

--
tejun

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCHSET sched_ext/for-7.4] sched_ext: Add ops.sub_child_ecaps_updated()
@ 2026-10-08  0:03 Tejun Heo
  2026-10-08  0:03 ` [PATCH 2/2] sched_ext: scx_qmap: Reset a child's cpuperf targets once its PERF revoke takes effect Tejun Heo
  0 siblings, 1 reply; 4+ messages in thread
From: Tejun Heo @ 2026-10-08  0:03 UTC (permalink / raw)
  To: sched-ext
  Cc: David Vernet, Andrea Righi, Changwoo Min, Emil Tsalapatis,
	David Dai, linux-kernel, Tejun Heo

Hello,

A grant or revoke only records the target caps. They take effect on a cid at
its next dispatch, and nothing tells the parent when. Until then the parent
cannot act on a revoke, such as resetting the cpuperf target a child left on
the cid.

Patch 1 adds ops.sub_child_ecaps_updated(), delivered to the direct parent
right after the child's own ops.sub_ecaps_updated(), with the child's cgroup
id and the same before and after caps. A sub's disable reports the caps it
still held as revoked before the parent's ops.sub_detach(). Patch 2 makes
scx_qmap reset a child's cpuperf target once its PERF revoke takes effect.

Based on sched_ext/for-7.4 (3d7c2f550eef).

This patchset contains the following 2 patches.

 0001 sched_ext: Add ops.sub_child_ecaps_updated() to report a child's effective cap changes
 0002 sched_ext: scx_qmap: Reset a child's cpuperf targets once its PERF revoke takes effect

The patchset is also available in the following git branch:

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git sub-child-ecaps

diffstat follows. Thanks.

 kernel/sched/ext/ext.c         |   4 ++
 kernel/sched/ext/internal.h    |  29 ++++++++-
 kernel/sched/ext/sub.c         | 130 ++++++++++++++++++++++++++++++++++-------
 tools/sched_ext/scx_qmap.bpf.c |  15 +++++
 tools/sched_ext/scx_qmap.c     |   7 ++-
 tools/sched_ext/scx_qmap.h     |   1 +
 6 files changed, 161 insertions(+), 25 deletions(-)

--
tejun

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

end of thread, other threads:[~2026-10-08  9:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08  9:32 [PATCHSET v2 sched_ext/for-7.4] sched_ext: Add ops.sub_child_ecaps_updated() Tejun Heo
2026-10-08  9:32 ` [PATCH 1/2] sched_ext: Add ops.sub_child_ecaps_updated() to report a child's effective cap changes Tejun Heo
2026-10-08  9:32 ` [PATCH 2/2] sched_ext: scx_qmap: Reset a child's cpuperf targets once its PERF revoke takes effect Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2026-10-08  0:03 [PATCHSET sched_ext/for-7.4] sched_ext: Add ops.sub_child_ecaps_updated() Tejun Heo
2026-10-08  0:03 ` [PATCH 2/2] sched_ext: scx_qmap: Reset a child's cpuperf targets once its PERF revoke takes effect Tejun Heo

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

all inboxes | Powered by JetHome®