linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 1/2] sched/deadline: accurate reclaim bandwidth for GRUB
Date: Thu, 11 May 2023 22:03:36 +0200	[thread overview]
Message-ID: <20230511220336.05866e80@nowhere> (raw)
In-Reply-To: <CAO7JXPiKLFLVpqDKoRdu8c2Yd4AJ_2B2UyXJxD3kJAyiJ=n0_Q@mail.gmail.com>

Hi,

first of all, thanks for your patience with my comments :)

On Thu, 11 May 2023 14:34:38 -0400
Vineeth Remanan Pillai <vineeth@bitbyteword.org> wrote:
[...]
> SMP GRUB paper has the equation for depreciating runtime as:
>   dq_i = -max{u_i, 1 - (extra_bw + Uinact)} dt
> 
> Since we are caping at Umax, the equation would be
>   dq_i = -(max{u_i, Umax - (extra_bw + Uinact)} / Umax) dt (1)
> 
> But existing implementation is:
>   dq_i = -max{u_i/Umax, 1 - (extra_bw + Uinact)} dt (2)
> 
> Here in (2), we factored Umax only to the first term "u_i" and the
> second term in max{} was as left as it is. What do you think?

I agree with you, (1) looks more correct. I do not know why I
implemented (2), but I agree with (1) now.


> Now with normal DL and SCHED_FLAG_RECLAIM tasks, equation (1) can be
> re-written as:
>   dq_i =
>    -(max{u_i, Ureclaim_max - (extra_bw + Uinact)}/Ureclaim_max)dt (3)
> 
> I tested this equation (3) and it works as expected. What do you think
> about the correctness of equation (3)?

I agree with this too.

> 
> I felt that, since we are using sequential reclaim mentioned in the
> paper and we isolate all parameters per-cpu(except for extra_bw) we
> could use the "-dq = -(U/Umax) dt" equation as it was simpler than
> equation (3).

This is the part I am not sure about...

Maybe the best way to go is to split the patch: first you implement (1)
(and use div64 to remove the approximation I used), then you implement
(3) in a second patch.

Finally, if removing the max{} is really needed you can do it in a
third patch (but I would try to go with Equation 3 before removing the
max{})


			Thanks,
				Luca

  reply	other threads:[~2023-05-11 20:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-08 16:08 [PATCH 1/2] sched/deadline: accurate reclaim bandwidth for GRUB Vineeth Pillai
2023-05-08 16:08 ` [PATCH 2/2] Documentation: sched/deadline: Update GRUB description Vineeth Pillai
2023-05-10  8:05   ` Bagas Sanjaya
2023-05-09 11:25 ` [PATCH 1/2] sched/deadline: accurate reclaim bandwidth for GRUB luca abeni
2023-05-09 19:29   ` Vineeth Remanan Pillai
2023-05-09 20:48     ` luca abeni
2023-05-09 20:54       ` luca abeni
2023-05-10  3:53         ` Vineeth Remanan Pillai
2023-05-10  7:07           ` luca abeni
2023-05-10 15:50             ` Vineeth Remanan Pillai
2023-05-11  7:37               ` luca abeni
2023-05-11 18:34                 ` Vineeth Remanan Pillai
2023-05-11 20:03                   ` luca abeni [this message]
2023-05-11 20:40                     ` Vineeth Remanan Pillai
2023-05-15  2:56                       ` Vineeth Remanan 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=20230511220336.05866e80@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).