Thread (82 messages) 82 messages, 7 authors, 2018-08-20

Re: [PATCH v3 07/14] sched/core: uclamp: enforce last task UCLAMP_MAX

From: Patrick Bellasi <hidden>
Date: 2018-08-16 17:27:11
Also in: lkml

On 16-Aug 19:10, Dietmar Eggemann wrote:
On 08/16/2018 06:47 PM, Patrick Bellasi wrote:
quoted
On 16-Aug 17:43, Dietmar Eggemann wrote:
quoted
On 08/06/2018 06:39 PM, Patrick Bellasi wrote:
quoted
When a util_max clamped task sleeps, its clamp constraints are removed
from the CPU. However, the blocked utilization on that CPU can still be
higher than the max clamp value enforced while that task was running.
This max clamp removal when a CPU is going to be idle could thus allow
unwanted CPU frequency increases, right while the task is not running.
So 'rq->uclamp.flags == UCLAMP_FLAG_IDLE' means CPU is IDLE because
non-clamped tasks are tracked as well ((group_id = 0)).
Right, but... with (group_id = 0) you mean that "non-clamped tasks are
tracked" in the first clamp group?
Yes. I was asking myself what will happen if there are only non-clamped
tasks runnable ...
Non clamped tasks is kind-of ambiguous, since you can have:
a) tasks with util_max = UCLAMP_NOT_VALID (the default for all tasks)
b) tasks with util_max = SCHED_CAPACITY_SCALE as a task specific
    clamp value

They are both technically not clamped but, for case b there should not
be issue, since we will track SCHED_CAPACITY_SCALE as idle hold value.

For case a instead is a bit different, especially when they mix with
tasks with a valid task specific clamp value, as I've just commented
in this posting:

   Message-ID: <20180816172016.GG2960@e110439-lin>
quoted
quoted
Maybe this is worth mentioning here?
Maybe I can explicitely say that we detect that there are not RUNNABLE
tasks because all the clamp groups are in UCLAMP_NOT_VALID status.
Yes, would have helped me the grasp this earlier ...
Right, I'm going to add a bit of text on that.

Cheers Patrick

-- 
#include <best/regards.h>

Patrick Bellasi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help