lkml.org 
[lkml]   [2022]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Sum of weights idea for CFS PI
On Fri, Sep 30, 2022 at 2:10 PM Youssef Esmat <youssefesmat@google.com> wrote:
[..]
> > > Hi Everyone!
> >
> > Hi Youssef,
> >
> > (Youssef is new to LKML though in no way new to OS or software development. I
> > gave him the usual 'dont-top-post' chat already - fyi).
> >
> > > I am not sure we should care about A's sleeping pattern. The case we
> > > care about is when A is running or wants to run but can't because it
> > > is blocked on C. In that case C should get the weight of A as if A was
> > > running.
> >
> > Just to clarify - Youssef did mean sum of weights of different things in the
> > chain, and not just weights (he confirmed on chat that that's what he meant).
> >
>
> Yeah thanks for clarifying, I meant that C should get the sum of
> weights as if A was running (3/5 in your example) since in this
> segment of time A would have been running if it was not blocked on the
> lock. I think it's safe to ignore the average and just use the sum of

For the onlooker, we are talking about the classical case of priority
inversion involving 3 tasks A, B and C which can be expanded to a
chain of tasks. Highest prio A blocks on a lock that lowest prio C
holds, while an unrelated medium prio B blocks C (or reduces progress
of it as in the case of CFS).

On the note of "A would have been running if it was not blocked on the
lock". I think that would be an assumption - we don't know if A would
be running. We only know the past, not the future. A could very well
make an I/O request for example. Hence there could be a need to use
A's past utilization, right?

thanks,

- Joel

\
 
 \ /
  Last update: 2022-09-30 20:46    [W:0.072 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site