All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>,
	mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
	bristot@redhat.com, linux-kernel@vger.kernel.org
Cc: odin@uged.al
Subject: Re: [PATCH] sched/pelt: check that *_avg are null when *_sum are
Date: Thu, 3 Jun 2021 12:42:33 +0200	[thread overview]
Message-ID: <438d95b4-330b-8a4b-a800-bab15db4f170@arm.com> (raw)
In-Reply-To: <20210601155328.19487-1-vincent.guittot@linaro.org>

On 01/06/2021 17:53, Vincent Guittot wrote:
> Check that we never break the rule that pelt's avg values are null if
> pelt's sum are.
> 
> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
> ---
> 
> This is what I used for patch 20210601085832.12626-1-vincent.guittot@linaro.org
> 
>  kernel/sched/fair.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index a2c30e52de76..c17feadeafcc 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -8021,6 +8021,15 @@ static inline bool cfs_rq_is_decayed(struct cfs_rq *cfs_rq)
>  	if (cfs_rq->avg.runnable_sum)
>  		return false;
>  
> +	/*
> +	 * _avg must be null when _sum are null because _avg = _sum / divider
> +	 * Make sure that rounding and/or propagation of PELT values never
> +	 * break this.
> +	 */
> +	SCHED_WARN_ON(cfs_rq->avg.load_avg ||
> +		      cfs_rq->avg.util_avg ||
> +		      cfs_rq->avg.runnable_avg);
> +
>  	return true;
>  }

Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>

  parent reply	other threads:[~2021-06-03 10:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 15:53 [PATCH] sched/pelt: check that *_avg are null when *_sum are Vincent Guittot
2021-06-02  6:45 ` [sched/pelt] e906550aca: WARNING:at_kernel/sched/fair.c:#update_blocked_averages kernel test robot
2021-06-02  6:45   ` kernel test robot
2021-06-02  6:45   ` [LTP] " kernel test robot
2021-06-03 10:50   ` Dietmar Eggemann
2021-06-03 10:50     ` Dietmar Eggemann
2021-06-03 10:50     ` [LTP] " Dietmar Eggemann
2021-06-03 10:59     ` Vincent Guittot
2021-06-03 10:59       ` Vincent Guittot
2021-06-03 10:59       ` [LTP] " Vincent Guittot
2021-06-03 10:42 ` Dietmar Eggemann [this message]
2021-06-03 11:06 ` [PATCH] sched/pelt: check that *_avg are null when *_sum are Odin Ugedal
2021-06-03 12:47   ` Vincent Guittot
2021-06-03 14:32     ` Odin Ugedal
2021-06-18  8:46 ` [tip: sched/core] sched/pelt: Check " tip-bot2 for Vincent Guittot

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=438d95b4-330b-8a4b-a800-bab15db4f170@arm.com \
    --to=dietmar.eggemann@arm.com \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=odin@uged.al \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.