diff options
author | Haifeng Xu <haifeng.xu@shopee.com> | 2023-09-26 11:57:22 +0000 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2023-10-13 09:56:29 +0200 |
commit | 0c2924079f5a83ed715630680e338b3685a0bf7d (patch) | |
tree | 44d0db40954324e4095a73dcbcadd16ae4d2c015 /kernel/sched | |
parent | f577cd57bfaa889cf0718e30e92c08c7f78c9d85 (diff) |
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
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/psi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c index 44a78774ae87..519bc922a960 100644 --- a/kernel/sched/psi.c +++ b/kernel/sched/psi.c @@ -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; |