summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorChristian Loehle <christian.loehle@arm.com>2026-10-15 12:37:54 +0100
committerIngo Molnar <mingo@kernel.org>2026-11-06 10:01:52 +0100
commit0965587d00b84f0a3b0fc94930d4a5f8ff011eda (patch)
treec767901fd3e5fc7adebb3987957d78b0c299cede /tools/lib/python
parent0c93e25ef11a9dee43f6076bd1f09771dc2b167e (diff)
sched/core: Account I/O waits independently of delayed dequeue
Starting blkio delay accounting and incrementing rq->nr_iowait in __block_task() ties both to removal from the runqueue. With EEVDF delayed dequeue, this misses the initial part of an I/O sleep, or the entire sleep if the task wakes before it is dequeued. Such tasks are also missing from procs_blocked while their dequeue is delayed. Final dequeue can run in another task's context, causing delayacct_blkio_start() to timestamp the wrong task. Start both forms of accounting in try_to_block_task(), when the current task commits to blocking, before delayed dequeue or proxy execution can retain it on the runqueue. End both when clearing is_blocked, including queued wakeups and the proxy execution paths that let the current task continue. Checking is_blocked excludes wakeups that precede blocking. Save the CPU charged at the start of the wait. Delayed tasks can migrate while still queued, and proxy execution can also move blocked tasks. Decrement the saved CPU's counter on unblock, regardless of the task's current placement, and remove the old dequeue-based accounting. CPU iowait continues to classify idle time using the counter on the charged CPU; it does not accumulate the full per-task blocked duration. Closes: https://lore.kernel.org/r/20261014081731.1068794-1-zhanxusheng@xiaomi.com Fixes: 152e11f6df29 ("sched/fair: Implement delayed dequeue") Reported-by: Zhan Xusheng <zhanxusheng@xiaomi.com> Signed-off-by: Christian Loehle <christian.loehle@arm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Zhan Xusheng <zhanxusheng@xiaomi.com> Reviewed-by: Kayra Cizmeci <kayracizmeci@gmail.com> Link: https://patch.msgid.link/fd8578a1-e60b-4993-ab51-2b5d63abcf77@arm.com
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions