From: Chengming Zhou <zhouchengming@bytedance.com>
To: Haifeng Xu <haifeng.xu@shopee.com>, hannes@cmpxchg.org
Cc: surenb@google.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/psi: bail out early from irq time accounting
Date: Mon, 25 Sep 2023 21:56:57 +0800 [thread overview]
Message-ID: <4f5b8a45-4952-43b0-8818-b78d85fbbf74@bytedance.com> (raw)
In-Reply-To: <20230925102143.462545-1-haifeng.xu@shopee.com>
On 2023/9/25 18:21, Haifeng Xu wrote:
> 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;
>
Reviewed-by: Chengming Zhou <zhouchengming@bytedance.com>
Thanks.
prev parent reply other threads:[~2023-09-25 13:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-25 10:21 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 ` Chengming Zhou [this message]
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=4f5b8a45-4952-43b0-8818-b78d85fbbf74@bytedance.com \
--to=zhouchengming@bytedance.com \
--cc=haifeng.xu@shopee.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=surenb@google.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®