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] [day] [month] [year] [list]
Message-ID: <20211009224552.GA174703@worktop.programming.kicks-ass.net>
Date:   Sun, 10 Oct 2021 00:45:52 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Tao Zhou <tao.zhou@...ux.dev>
Cc:     linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        Daniel Bristot de Oliveira <bristot@...hat.com>
Subject: Re: [PATCH] sched/pelt: Use or not add in update_irq_load_avg()

On Sun, Oct 10, 2021 at 02:06:42AM +0800, Tao Zhou wrote:
> The ret value of update_irq_load_avg() can be 2. And this value
> is used in __update_blocked_others(). It should be 0 or 1. Use
> OR operation in update_irq_load_avg().

AFAICT it doesn't matter one way or the other, but you're probably right
in that |= makes more sense.

No Signed-off-by tag...

> ---
>  kernel/sched/pelt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/pelt.c b/kernel/sched/pelt.c
> index a554e3bbab2b..7edf21f7977c 100644
> --- a/kernel/sched/pelt.c
> +++ b/kernel/sched/pelt.c
> @@ -458,7 +458,7 @@ int update_irq_load_avg(struct rq *rq, u64 running)
>  				0,
>  				0,
>  				0);
> -	ret += ___update_load_sum(rq->clock, &rq->avg_irq,
> +	ret |= ___update_load_sum(rq->clock, &rq->avg_irq,
>  				1,
>  				1,
>  				1);
> -- 
> 2.32.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ