Re: [PATCH v2] sched/fair: Do not set skip buddy up the sched hierarchy

From: Dietmar Eggemann
Date: Mon Dec 09 2019 - 04:19:09 EST

On 06.12.19 23:13, Josh Don wrote:


> On Thu, Dec 5, 2019 at 11:57 PM Vincent Guittot
> <vincent.guittot@xxxxxxxxxx> wrote:
>> Hi Josh,
>> On Wed, 4 Dec 2019 at 21:06, Josh Don <joshdon@xxxxxxxxxx> wrote:
>>> From: Venkatesh Pallipadi <venki@xxxxxxxxxx>
>>> Setting skip buddy all the way up the hierarchy does not play well
>>> with intra-cgroup yield. One typical usecase of yield is when a
>>> thread in a cgroup wants to yield CPU to another thread within the
>>> same cgroup. For such a case, setting the skip buddy all the way up

But with yield_task{_fair}() you have no way to control which other task
gets accelerated. The other task in the taskgroup (cgroup) could be even
on another CPU.

It's not like yield_to_task_fair() which uses next buddy to accelerate
another task p.

What's this typical usecase?

>>> the hierarchy is counter-productive, as that results in CPU being
>>> yielded to a task in some other cgroup.
>>> So, limit the skip effect only to the task requesting it.