mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Haifeng Xu" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Haifeng Xu <haifeng.xu@shopee.com>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Chengming Zhou <zhouchengming@bytedance.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: sched/core] sched/psi: Bail out early from irq time accounting
Date: Fri, 13 Oct 2023 08:06:12 -0000	[thread overview]
Message-ID: <169718437261.3135.12208635380704050499.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20230926115722.467833-1-haifeng.xu@shopee.com>

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     0c2924079f5a83ed715630680e338b3685a0bf7d
Gitweb:        https://git.kernel.org/tip/0c2924079f5a83ed715630680e338b3685a0bf7d
Author:        Haifeng Xu <haifeng.xu@shopee.com>
AuthorDate:    Tue, 26 Sep 2023 11:57:22 
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Fri, 13 Oct 2023 09:56:29 +02:00

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
---
 kernel/sched/psi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c
index 44a7877..519bc92 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;
 

  parent reply	other threads:[~2023-10-13  8:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-25 10:21 [PATCH] sched/psi: bail " 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-bot2 for Haifeng Xu [this message]
2023-09-25 13:56 ` [PATCH] " Chengming Zhou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=169718437261.3135.12208635380704050499.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=haifeng.xu@shopee.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=x86@kernel.org \
    --cc=zhouchengming@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®