From: Hongyan Xia <hongyan.xia2@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: lukasz.luba@arm.com, juri.lelli@redhat.com, mingo@redhat.com,
dietmar.eggemann@arm.com, peterz@infradead.org,
bsegall@google.com, rostedt@goodmis.org, bristot@redhat.com,
mgorman@suse.de, vschneid@redhat.com, rafael@kernel.org,
qyousef@layalina.io, viresh.kumar@linaro.org,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH] sched/pelt: avoid underestimate of task utilization
Date: Fri, 24 Nov 2023 10:34:59 +0000 [thread overview]
Message-ID: <39cde23a-19d8-4e64-a1d2-f26bce264883@arm.com> (raw)
In-Reply-To: <CAKfTPtCnj9Gnczt7aJOELRW+_Rgs3Qp9KFM9Kn17YQ3nFbNdhQ@mail.gmail.com>
On 22/11/2023 17:37, Vincent Guittot wrote:
> The same but with plain text instead of html ...
>
> On Wed, 22 Nov 2023 at 17:40, Hongyan Xia <hongyan.xia2@arm.com> wrote:
>>
>> Hi Vincent,
>>
>> On 22/11/2023 14:01, Vincent Guittot wrote:
>>> It has been reported that thread's util_est can significantly decrease as
>>> a result of sharing the CPU with other threads. The use case can be easily
>>> reproduced with a periodic task TA that runs 1ms and sleeps 100us.
>>> When the task is alone on the CPU, its max utilization and its util_est is
>>> around 888. If another similar task starts to run on the same CPU, TA will
>>> have to share the CPU runtime and its maximum utilization will decrease
>>> around half the CPU capacity (512) then TA's util_est will follow this new
>>> maximum trend which is only the result of sharing the CPU with others
>>> tasks. Such situation can be detected with runnable_avg wich is close or
>>> equal to util_avg when TA is alone but increases above util_avg when TA
>>> shares the CPU with other threads and wait on the runqueue.
>>
>> Thanks for bringing this case up. I'm a bit nervous skipping util_est
>> updates this way. While it is true that this avoids dropping util_est
>> when the task is still busy doing stuff, it also avoids dropping
>> util_est when the task really is becoming less busy. If a task has a
>> legitimate reason to drop its utilization, it looks weird to me that its
>> util_est dropping can be stopped by a new task joining this rq which
>> pushes up runnable_avg.
>
> We prefer an util_est that overestimate rather than under estimate
> because in 1st case you will not provide enough performance to the
> task which will remain under provisioned whereas in the other case you
> will create some idle time which will enable to reduce contention and
> as a result reduce the util_est so the overestimate will be transient
> whereas the underestimate will be remain
My concern is mostly about energy efficiency, although I have no
concrete evidence on energy impact so I'm not firmly against this patch.
>
>> Also, something about rt-app. Is there an easy way to ask an rt-app
>> thread to achieve a certain amount of throughput (like loops per
>> second)? I think 'runs 1ms and sleeps 100us' may not entirely simulate a
>> task that really wants to preserve a util_est of 888. If its utilization
>
>
> We can do this in rt-app with timer...
Thanks. Looking at the rt-app doc, I think a timer with absolute time
stamps does what I want.
next prev parent reply other threads:[~2023-11-24 10:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 14:01 Vincent Guittot
2023-11-21 23:01 ` Qais Yousef
2023-11-23 14:27 ` Lukasz Luba
2023-11-23 16:45 ` Qais Yousef
2023-11-22 16:40 ` Hongyan Xia
[not found] ` <CAKfTPtAosL8f0M1nL2U78iuwm9ZFGuQS5jX4soex8nsGjMX_RQ@mail.gmail.com>
2023-11-22 17:37 ` Vincent Guittot
2023-11-24 10:34 ` Hongyan Xia [this message]
2023-11-23 10:30 ` [tip: sched/core] sched/pelt: Avoid underestimation " tip-bot2 for Vincent Guittot
2023-11-23 13:13 ` [PATCH] sched/pelt: avoid underestimate " Lukasz Luba
2023-11-24 10:43 ` Hongyan Xia
2023-11-24 12:04 ` 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=39cde23a-19d8-4e64-a1d2-f26bce264883@arm.com \
--to=hongyan.xia2@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=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=qyousef@layalina.io \
--cc=rafael@kernel.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=vschneid@redhat.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®