Re: [PATCH 1/2] sched/deadline: accurate reclaim bandwidth for GRUB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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

On Thu, 11 May 2023 14:34:38 -0400
Vineeth Remanan Pillai <vineeth@xxxxxxxxxxxxxxx> 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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux