Re: [PATCH] sched: Introduce scaled capacity awareness in enqueue

From: Peter Zijlstra
Date: Tue May 30 2017 - 08:28:43 EST


On Mon, May 22, 2017 at 01:48:14PM -0700, Rohit Jain wrote:
> The patch introduces capacity awarness in scheduler (CAS) which avoids
> CPUs which might have their capacities reduced (due to IRQ/RT activity)
> when trying to schedule threads (on the push side) in the system. This
> awareness has been added into the fair scheduling class.
>
> It does so by, using the following algorithm:
> --------------------------------------------------------------------------
> 1) As in rt_avg the scaled capacities are already calculated.
>
> 2) This scaled capacity is normalized and mapped into buckets.

Why?

> 3) Any CPU which lies below the 80th percentile in terms of percentage
> capacity available is considered as a low capacity CPU.

Random number; can we do better? What does existing code do?