Skip to content

Commit 0c29240

Browse files
hfxspPeter Zijlstra
authored andcommitted
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
1 parent f577cd5 commit 0c29240

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

kernel/sched/psi.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,9 @@ void psi_account_irqtime(struct task_struct *task, u32 delta)
998998
struct psi_group_cpu *groupc;
999999
u64 now;
10001000

1001+
if (static_branch_likely(&psi_disabled))
1002+
return;
1003+
10011004
if (!task->pid)
10021005
return;
10031006

0 commit comments

Comments
 (0)