2017-12-07 09:24:57

by Viresh Kumar

[permalink] [raw]
Subject: Re: [PATCH v3 6/6] cpufreq: schedutil: ignore sugov kthreads

On 30-11-17, 16:42, Patrick Bellasi wrote:
> On 30-Nov 17:12, Juri Lelli wrote:
> > Not sure about this though, not my call :). I guess this still helps
> > until we get the DL changes in.
>
> Yes, agree... well Viresh had some concerns about this patch.
> Let see what he thinks.

And the problem is that we never got to a conclusion in V2 for this
patch as well, as you never responded to the last set of queries I
had. Unless we finish the ongoing conversations, we will have the same
queries again.

IOW, can you explain the exact scenario where this patch will be
helpful ? I am not sure if this patch is that helpful at all :)

--
viresh


2017-12-07 15:48:00

by Patrick Bellasi

[permalink] [raw]
Subject: Re: [PATCH v3 6/6] cpufreq: schedutil: ignore sugov kthreads

On 07-Dec 14:54, Viresh Kumar wrote:
> On 30-11-17, 16:42, Patrick Bellasi wrote:
> > On 30-Nov 17:12, Juri Lelli wrote:
> > > Not sure about this though, not my call :). I guess this still helps
> > > until we get the DL changes in.
> >
> > Yes, agree... well Viresh had some concerns about this patch.
> > Let see what he thinks.
>
> And the problem is that we never got to a conclusion in V2 for this
> patch as well, as you never responded to the last set of queries I
> had. Unless we finish the ongoing conversations, we will have the same
> queries again.
>
> IOW, can you explain the exact scenario where this patch will be
> helpful ? I am not sure if this patch is that helpful at all :)

My use case is considering a small FAIR task which triggers an OPP
change while running on a CPU which is different from the one running
the schedutil kthread.

If we go for a "clear flags semantics", where the RT class clears its
flag as soon as there are not more RT tasks runnable, then this patch
likely is not more required.

Otherwise, there can be corner cases in which the RT flag remain set in
the kthread CPU thus affecting OPP decisions even then there are not
RT tasks around. Consider for example this scenarios:


CPU0: | SUGOV | | SUGOV |
small FAIR | | small FAIR | |
flags = RT ^
^ |
| (A) | (B)
| sugov_update_util() |
| | sugov_update_util()
CPU1: medium growing FAIR task | another FAIR enqueued


In this case:
- in A we set the RT flag
- in B we pick the MAX OPP even if there are only small tasks.


This will not happen with a "clear flags semantics" because we ensure
to release the RT flag every time an RT task exit the CPU.
Thus, if we go for that semantics, we can skip this patch.

--
#include <best/regards.h>

Patrick Bellasi