From: Vincent Donnefort <vincent.donnefort@arm.com>
To: Xuewen Yan <xuewen.yan94@gmail.com>
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
bristot@redhat.com, linux-kernel@vger.kernel.org,
zhang.lyra@gmail.com, xuewyan@foxmail.com
Subject: Re: [PATCH] sched/pelt: Add UTIL_AVG_UNCHANGED flag for last_enqueued_diff
Date: Thu, 6 May 2021 12:28:23 +0000 [thread overview]
Message-ID: <20210506122823.GA8671@ubiquitous> (raw)
In-Reply-To: <20210506110936.8797-1-xuewen.yan94@gmail.com>
On Thu, May 06, 2021 at 07:09:36PM +0800, Xuewen Yan wrote:
> From: Xuewen Yan <xuewen.yan@unisoc.com>
>
> The UTIL_AVG_UNCHANGED flag had been cleared when the task util changed.
> And the enqueued is equal to task_util with the flag, so it is better
> to add the UTIL_AVG_UNCHANGED flag for last_enqueued_diff.
>
> Fixes: b89997aa88f0b sched/pelt: Fix task util_est update filtering
>
> Signed-off-by: Xuewen Yan <xuewen.yan@unisoc.com>
> ---
> kernel/sched/fair.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index e5e457fa9dc8..94d77b4fa601 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -3996,7 +3996,7 @@ static inline void util_est_update(struct cfs_rq *cfs_rq,
> if (ue.enqueued & UTIL_AVG_UNCHANGED)
> return;
>
> - last_enqueued_diff = ue.enqueued;
> + last_enqueued_diff = (ue.enqueued | UTIL_AVG_UNCHANGED);
>
> /*
> * Reset EWMA on utilization increases, the moving average is used only
> --
> 2.29.0
>
Hi,
We do indeed for the diff use the flag for the value updated and no flag for the
value before the update. However, last_enqueued_diff is only used for the margin
check which is an heuristic and is not an accurate value (~1%) and as we know
we already loose the LSB in util_est, I'm not sure this is really necessary.
--
Vincent
next prev parent reply other threads:[~2021-05-06 12:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-06 11:09 Xuewen Yan
2021-05-06 12:28 ` Vincent Donnefort [this message]
2021-05-06 12:46 ` Xuewen Yan
2021-05-06 16:26 ` Vincent Donnefort
2021-05-07 1:34 ` Xuewen Yan
2021-05-07 6:53 ` Vincent Guittot
2021-05-07 10:26 ` Xuewen Yan
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=20210506122823.GA8671@ubiquitous \
--to=vincent.donnefort@arm.com \
--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=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=xuewen.yan94@gmail.com \
--cc=xuewyan@foxmail.com \
--cc=zhang.lyra@gmail.com \
/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
all inboxes | Powered by JetHome®