Re: [PATCH 2/2] sched/fair: Scale wakeup granularity relative to nr_running
From: Mike Galbraith
Date: Tue Sep 21 2021 - 01:50:44 EST
On Tue, 2021-09-21 at 05:52 +0200, Mike Galbraith wrote:
> On Mon, 2021-09-20 at 15:26 +0100, Mel Gorman wrote:
>
>
> The scaled up tweakables on my little quad desktop box:
> sched_nr_latency = 8
> sched_wakeup_granularity = 4ms
> sched_latency = 24ms
>
> Due to the FAIR_SLEEPERS feature, a task can only receive a max of
> sched_latency/2 sleep credit, ie the delta between waking sleeper and
> current is clipped to a max of 12 virtual ms, so the instant our
> preempt threshold reaches 12.000ms, by human booboo or now 3 runnable
> tasks with this change, wakeup preemption is completely disabled, or?
I just dug up a now ancient artifact testcase allegedly distilled from
a real application's control thread sometime back in the dark ages, and
granularity >= latency/2 still does turn off wakeup preemption.
-Mike