Re: [RFC PATCH v3 00/16] Core scheduling v3

From: Tim Chen
Date: Tue Aug 06 2019 - 17:20:02 EST


On 8/6/19 10:12 AM, Peter Zijlstra wrote:

>> I'm wondering if something simpler will work. It is easier to maintain fairness
>> between the CPU threads. A simple scheme may be if the force idle deficit
>> on a CPU thread exceeds a threshold compared to its sibling, we will
>> bias in choosing the task on the suppressed CPU thread.
>> The fairness among the tenents per run queue is balanced out by cfq fairness,
>> so things should be fair if we maintain fairness in CPU utilization between
>> the two CPU threads.
>
> IIRC pjt once did a simle 5ms flip flop between siblings.
>

Trying out Peter's suggestions in the following two patches on v3 to
provide fairness between the CPU threads.
The changes is in patch 2 and patch 1 is simply a code reorg.

It is only minimally tested and seems to provide fairness between
two will-it-scale cgroups. Haven't tried it yet on something that
is less CPU intensive with lots of sleep in between.

Also need to put the account idle time for rt and dl sched classes.
Will do that later if this works for the fair class.

Tim

----------------patch 1-----------------------