summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2026-10-17 22:22:37 -1000
committerTejun Heo <tj@kernel.org>2026-10-19 10:59:07 -1000
commit51d2730ec19a72f0c00a858f98d98658f3063c82 (patch)
treeba449fe661f739f7fe3a8f43b9287ec1baca1a97 /include/linux
parentf89d11642c1b573356382f031e3e5eb4fe87166a (diff)
sched_ext: Report the ecaps loss when a cpu goes offline
When a cpu goes offline, a sub-scheduler's effective caps on its cid are cleared, but neither the sub-scheduler nor its parent is notified. The sub-scheduler keeps treating the cid as usable, and the parent can't act on the loss, e.g. reset the cpuperf target. Report the loss before the root's ops.cpu_offline() and the regain after its ops.cpu_online(). The zeroing at offline was the last change to a sched's ecaps outside a delivery, so they now change only with one. Syncs on an inactive cpu are processed instead of discarded, and the reseed reschedules the cpu itself, as they got no resched when queued. Suspend and hibernation now report their cpu downs and ups as well. This is temporary, and a later patch leaves them out. Two things need care. A cpu going down marks a sync for each sub-scheduler, and its hotplug thread waits until each marked sync has been processed. The cpu's own ext picks process them, and the ext server is started in case a fair task holds the cpu. Only the marked syncs count, so a flood of changes on the cid can't hold up the hotplug. The detach report reaches only active cpus. It holds off cpu hotplug, so a cpu it skips has reported its loss as it went down, and no unreported loss is left to drop. Drop the cpuperf reset from scx_qmap's ops.sub_detach(), as its ops.sub_child_ecaps_updated() now resets the targets on the loss reports. v2: Reschedule from the irq work and document the regain order. v3: Pack nr_ecaps_offline with kick_sync_pending to avoid a hole (Andrea). Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions