diff options
| author | John Stultz <[email protected]> | 2025-04-29 15:07:26 +0000 |
|---|---|---|
| committer | Peter Zijlstra <[email protected]> | 2025-04-30 12:45:41 +0000 |
| commit | b7ca5743a2604156d6083b88cefacef983f3a3a6 (patch) | |
| tree | 6161a960a530de7ba3db9fde196f9377ebaa224a /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
| parent | sched/fair: Adhere to place_entity() constraints (diff) | |
| download | kernel-b7ca5743a2604156d6083b88cefacef983f3a3a6.tar.gz kernel-b7ca5743a2604156d6083b88cefacef983f3a3a6.zip | |
sched/core: Tweak wait_task_inactive() to force dequeue sched_delayed tasks
It was reported that in 6.12, smpboot_create_threads() was
taking much longer then in 6.6.
I narrowed down the call path to:
smpboot_create_threads()
-> kthread_create_on_cpu()
-> kthread_bind()
-> __kthread_bind_mask()
->wait_task_inactive()
Where in wait_task_inactive() we were regularly hitting the
queued case, which sets a 1 tick timeout, which when called
multiple times in a row, accumulates quickly into a long
delay.
I noticed disabling the DELAY_DEQUEUE sched feature recovered
the performance, and it seems the newly create tasks are usually
sched_delayed and left on the runqueue.
So in wait_task_inactive() when we see the task
p->se.sched_delayed, manually dequeue the sched_delayed task
with DEQUEUE_DELAYED, so we don't have to constantly wait a
tick.
Fixes: 152e11f6df29 ("sched/fair: Implement delayed dequeue")
Reported-by: [email protected]
Signed-off-by: John Stultz <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Tested-by: K Prateek Nayak <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
0 files changed, 0 insertions, 0 deletions
