Interesting, thanks Rik. I assumed that couldn't be correct, since it would result in lower priority tasks receiving a slice less than the sysctl_sched_min_granularity - which I assumed CFS explicitly aims to prevent.

Thanks for taking a look.

On Fri, Apr 3, 2020 at 1:51 AM Valdis Klētnieks <valdis.kletnieks@vt.edu> wrote:
On Thu, 02 Apr 2020 22:10:11 -0400, Evan T Mesterhazy said:

> I ran a test by starting five busy processes with a nice level of -10.
> Next, I launched ~40 busy processes with a nice level of 0 (all procs were
> set to use the same CPU). I expected CFS to expand the period and assign
> each process a slice equal to the min granularity. However, the 5 processes
> with nice = -10 still used considerably more CPU than the other processes.

Well, it's *expected* that if you set nice = -10 they'll get more CPU.

Do you have any evidence that CFS *didn't* give the nice==0 processes a
min_granularity slide once in a while?


--
Evan Mesterhazy
etm2131@columbia.edu