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 <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Chengming Zhou <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent f577cd5 commit 0c29240

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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)