mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched/psi: bail out early from irq time accounting
@ 2023-09-25 10:21 Haifeng Xu
  2023-09-25 12:31 ` Johannes Weiner
  2023-09-25 13:56 ` [PATCH] sched/psi: bail " Chengming Zhou
  0 siblings, 2 replies; 8+ messages in thread
From: Haifeng Xu @ 2023-09-25 10:21 UTC (permalink / raw)
  To: hannes; +Cc: surenb, linux-kernel, Haifeng Xu

We could bail out early when psi was disabled.

Signed-off-by: Haifeng Xu <haifeng.xu@shopee.com>
---
 kernel/sched/psi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c
index 81fca77397f6..e74e14762d49 100644
--- a/kernel/sched/psi.c
+++ b/kernel/sched/psi.c
@@ -1005,6 +1005,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;
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-10-13  8:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-25 10:21 [PATCH] sched/psi: bail out early from irq time accounting Haifeng Xu
2023-09-25 12:31 ` Johannes Weiner
2023-09-26 10:51   ` Haifeng Xu
2023-09-26 11:57   ` [PATCH RESEND] " Haifeng Xu
2023-09-26 12:14     ` Chengming Zhou
2023-10-03 11:20     ` Peter Zijlstra
2023-10-13  8:06     ` [tip: sched/core] sched/psi: Bail " tip-bot2 for Haifeng Xu
2023-09-25 13:56 ` [PATCH] sched/psi: bail " Chengming Zhou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®