Re: [PATCH] sched: Take thermal pressure into account when determine rt fits capacity

From: Qais Yousef
Date: Sat May 14 2022 - 20:01:58 EST


On 05/14/22 23:01, Xuewen Yan wrote:
> On Wed, May 11, 2022 at 6:03 AM Lukasz Luba <lukasz.luba@xxxxxxx> wrote:

[...]

> > True, but this is a CFS 'world' and the update path is part of load
> > balance. Your proposed code which sets the new
> > 'rq->cpu_capacity_inverted' is run there, which might have some
> > delays.
>
> Yes, that's exactly what I'm worried about.

Hmm. In Android world, where we are concerned here, CFS is a first class
citizen. If we have issues in updating capacities there, this might be hurting
other non-RT related use cases too. So something to ponder in general.

Anyways. It's a very valid concern and I agree with it too. We can do better.
See below.

[...]

> > Capacity of other CPU might also be reduced and capacity_orig is not
> > reflecting that. My gut feeling tells me that this capacity_orig
> > assumption might be too optimistic for some platforms.
>
> In unisoc platform with 3 clusters(little/mid/big), there are cases
> that middle core and big core are throttled at the same time.

Okay. I might have misunderstood you before, but I thought medium cores don't
suffer any meaningful thermal pressure.

[...]

> Okay, I could push patch v2 later. Maybe we can continue to discuss
> this topic based on v2.

Please do.

I have scratched my head and played around implementing the generic solution
using additional cpumasks. If you fancy testing it, that'd be great! I have
tested it very lightly only. If you like it and no one shouts it's terrible, we
can shape it further.

--->8---