From: luca abeni <luca.abeni@santannapisa.it>
To: Vineeth Remanan Pillai <vineeth@bitbyteword.org>
Cc: Juri Lelli <juri.lelli@redhat.com>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Steven Rostedt <rostedt@goodmis.org>,
Joel Fernandes <joel@joelfernandes.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
Jonathan Corbet <corbet@lwn.net>,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v3 2/5] sched/deadline: Fix reclaim inaccuracy with SMP
Date: Sat, 20 May 2023 11:50:13 +0200 [thread overview]
Message-ID: <20230520115013.55c61a00@nowhere> (raw)
In-Reply-To: <CAO7JXPhZPvzVRyL87qNT5VnaVOf=0wrRftFB-Rjx-vJc3JUMog@mail.gmail.com>
Hi,
On Fri, 19 May 2023 12:12:50 -0400
Vineeth Remanan Pillai <vineeth@bitbyteword.org> wrote:
[...]
> With both these equations, it doesn't solve couple of other issues we
> had discussed before:
> - tasks with different bandwidth reclaims differently even when #tasks
> is less than #cpus.
I think I now understand this issue (see below)
> - cpu util may go to 100% when we have tasks with large bandwidth
> close to Umax
This one is still not clear to me... I'll do some more analysis.
> As an eg. for issue 1, three tasks - (7,10) (3,10) and (1,10):
> TID[590]: RECLAIM=1, (r=7ms, d=10ms, p=10ms), Util: 95.20
> TID[591]: RECLAIM=1, (r=3ms, d=10ms, p=10ms), Util: 81.94
> TID[592]: RECLAIM=1, (r=1ms, d=10ms, p=10ms), Util: 27.19
So, the issue here is that GRUB tries to assign the reclaimed
utilization proportionally to the task's utilizations... So, 591 should
execute 3 times the amount of time executed by 592, and 590 should
execute 7 times the amount of time executed by 592. Task 592 is then
supposed to execute for 95 / (1 + 3 + 7) = 95 / 11 = 8.63% of the CPU
time; task 591 is supposed to execute for 8.63 * 3 = 25.9% of the CPU
time; task 590 is supposed to execute for 8.63 * 7 = 60.64% of the CPU
time.
So, 592 executes for 8.63 * 3 = 25.9% of the time on one single CPU
(you measured 27.19, but this is nead), task 591 executes for
25.9 * 3 = 77.72% of the time on one single CPU (again, this is
close to what you measured) and task 590 should execute for...
60.64 * 3 = 181.3% of the time on one single CPU! Which is clearly not
possible... And the "max{}" rule cuts this to 95%.
So, we are wasting 181.3 - 95 = 86.3% of CPU time, which 590 cannot
reclaim (because it cannot execute simultaneously on 2 CPUs).
And this is close to the amount of CPU time not reclaimed in the test
you cite above (95 - 81 + 95 - 27)
Now that the problem is more clear to me, I am trying to understand a
possible solution (as you mention, moving some extra bandwidth from the
590's CPU will fix this problem... But I am not sure if this dynamic
extra bandwidth migration is feasible in practice without introducing
too much overhead)
I'll look better at your new proposal.
Thanks,
Luca
next prev parent reply other threads:[~2023-05-20 9:50 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-15 2:57 [PATCH v3 0/5] GRUB reclaiming fixes Vineeth Pillai
2023-05-15 2:57 ` [PATCH v3 1/5] sched/deadline: Fix bandwidth reclaim equation in GRUB Vineeth Pillai
2023-05-15 2:57 ` [PATCH v3 2/5] sched/deadline: Fix reclaim inaccuracy with SMP Vineeth Pillai
2023-05-15 8:06 ` luca abeni
2023-05-16 1:47 ` Vineeth Remanan Pillai
2023-05-16 7:37 ` luca abeni
2023-05-16 15:08 ` Vineeth Remanan Pillai
2023-05-16 16:19 ` luca abeni
2023-05-17 2:17 ` Vineeth Remanan Pillai
2023-05-19 9:56 ` luca abeni
2023-05-19 10:18 ` luca abeni
2023-05-19 16:12 ` Vineeth Remanan Pillai
2023-05-20 9:50 ` luca abeni [this message]
2023-05-20 9:58 ` luca abeni
2023-05-22 19:22 ` Vineeth Remanan Pillai
2023-05-23 20:58 ` luca abeni
2023-05-24 2:11 ` Vineeth Remanan Pillai
2023-05-26 14:54 ` Vineeth Remanan Pillai
2023-05-26 15:18 ` luca abeni
2023-05-19 17:56 ` Dietmar Eggemann
2023-05-20 2:15 ` Vineeth Remanan Pillai
2023-05-25 11:55 ` Dietmar Eggemann
2023-05-15 2:57 ` [PATCH v3 3/5] sched/deadline: Remove unused variable extra_bw Vineeth Pillai
2023-05-15 2:57 ` [PATCH v3 4/5] sched/deadline: Account for normal deadline tasks in GRUB Vineeth Pillai
2023-05-15 2:57 ` [PATCH v3 5/5] Documentation: sched/deadline: Update GRUB description Vineeth Pillai
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=20230520115013.55c61a00@nowhere \
--to=luca.abeni@santannapisa.it \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=corbet@lwn.net \
--cc=dietmar.eggemann@arm.com \
--cc=joel@joelfernandes.org \
--cc=juri.lelli@redhat.com \
--cc=linux-doc@vger.kernel.org \
--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=vineeth@bitbyteword.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;
as well as URLs for NNTP newsgroup(s).