lkml.org 
[lkml]   [2023]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH RESEND] sched/psi: bail out early from irq time accounting
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
>

\
 
 \ /
  Last update: 2023-10-03 13:21    [W:0.059 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site