lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <826082e4-8b67-429b-951b-ae3f69455791@bytedance.com>
Date:   Tue, 26 Sep 2023 20:14:43 +0800
From:   Chengming Zhou <zhouchengming@...edance.com>
To:     Haifeng Xu <haifeng.xu@...pee.com>, hannes@...xchg.org
Cc:     surenb@...gle.com, peterz@...radead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] sched/psi: bail out early from irq time accounting

On 2023/9/26 19:57, Haifeng Xu wrote:
> We could bail out early when psi was disabled.
> 
> Signed-off-by: Haifeng Xu <haifeng.xu@...pee.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@...edance.com>

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ