public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Tao Zhou <tao.zhou@linux.dev>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>
Subject: Re: [PATCH] sched/pelt: Use or not add in update_irq_load_avg()
Date: Sun, 10 Oct 2021 00:45:52 +0200	[thread overview]
Message-ID: <20211009224552.GA174703@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20211009180642.20319-1-tao.zhou@linux.dev>

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
> 

      reply	other threads:[~2021-10-09 22:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-09 18:06 [PATCH] sched/pelt: Use or not add in update_irq_load_avg() Tao Zhou
2021-10-09 22:45 ` Peter Zijlstra [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=20211009224552.GA174703@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tao.zhou@linux.dev \
    --cc=vincent.guittot@linaro.org \
    /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