From: Peter Zijlstra <peterz@infradead.org>
To: Haifeng Xu <haifeng.xu@shopee.com>
Cc: hannes@cmpxchg.org, surenb@google.com,
zhouchengming@bytedance.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] sched/psi: bail out early from irq time accounting
Date: Tue, 3 Oct 2023 13:20:33 +0200 [thread overview]
Message-ID: <20231003112033.GH27267@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20230926115722.467833-1-haifeng.xu@shopee.com>
On Tue, Sep 26, 2023 at 11:57:22AM +0000, Haifeng Xu wrote:
> We could bail out early when psi was disabled.
>
> Signed-off-by: Haifeng Xu <haifeng.xu@shopee.com>
Thanks!
> ---
> 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
>
next prev parent reply other threads:[~2023-10-03 11:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-25 10:21 [PATCH] " 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 [this message]
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
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=20231003112033.GH27267@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=haifeng.xu@shopee.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=surenb@google.com \
--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®