]> www.infradead.org Git - users/dwmw2/linux.git/commit
sched/dlserver: Fix dlserver time accounting
authorVineeth Pillai (Google) <vineeth@bitbyteword.org>
Fri, 13 Dec 2024 03:22:37 +0000 (22:22 -0500)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 13 Dec 2024 11:57:35 +0000 (12:57 +0100)
commitc7f7e9c73178e0e342486fd31e7f363ef60e3f83
tree5674b963eeac2f81dfe26134db4010bc5075dd3a
parentb53127db1dbf7f1047cf35c10922d801dcd40324
sched/dlserver: Fix dlserver time accounting

dlserver time is accounted when:
 - dlserver is active and the dlserver proxies the cfs task.
 - dlserver is active but deferred and cfs task runs after being picked
   through the normal fair class pick.

dl_server_update is called in two places to make sure that both the
above times are accounted for. But it doesn't check if dlserver is
active or not. Now that we have this dl_server_active flag, we can
consolidate dl_server_update into one place and all we need to check is
whether dlserver is active or not. When dlserver is active there is only
two possible conditions:
 - dlserver is deferred.
 - cfs task is running on behalf of dlserver.

Fixes: a110a81c52a9 ("sched/deadline: Deferrable dl server")
Signed-off-by: "Vineeth Pillai (Google)" <vineeth@bitbyteword.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Marcel Ziswiler <marcel.ziswiler@codethink.co.uk> # ROCK 5B
Link: https://lore.kernel.org/r/20241213032244.877029-2-vineeth@bitbyteword.org
kernel/sched/fair.c