sched/psi: Bail out early from irq time accounting

We could bail out early when psi was disabled.

Signed-off-by: Haifeng Xu <haifeng.xu@shopee.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Chengming Zhou <zhouchengming@bytedance.com>
Link: https://lore.kernel.org/r/20230926115722.467833-1-haifeng.xu@shopee.com
This commit is contained in:
Haifeng Xu 2023-09-26 11:57:22 +00:00 committed by Peter Zijlstra
parent f577cd57bf
commit 0c2924079f

View file

@ -998,6 +998,9 @@ void psi_account_irqtime(struct task_struct *task, u32 delta)
struct psi_group_cpu *groupc;
u64 now;
if (static_branch_likely(&psi_disabled))
return;
if (!task->pid)
return;