Re: [PATCH] sched/fair: Fix overutilized update in enqueue_task_fair()

From: Quentin Perret
Date: Thu Nov 12 2020 - 07:39:02 EST


On Thursday 12 Nov 2020 at 12:29:59 (+0000), Valentin Schneider wrote:
> Alternatively: how much does not updating the overutilized status here help
> us? The next tick will unconditionally update it, which for arm64 is
> anywhere in the next ]0, 4]ms. That "fake" fork-time util_avg should already
> be accounted in the rq util_avg, and even if the new task was running the
> entire time, 4ms doesn't buy us much decay.

Yes, this is arguably a dodgy hack, which will not save us in a number
of cases. The only situation where this helps is for short-lived tasks
that will run only once. And this is a sadly common programming pattern.

So yeah, this is not the prettiest thing in the world, but it doesn't
cost us much and helps some real-world workloads, so ...

Thanks,
Quentin