lkml.org 
[lkml]   [2021]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] sched/fair: Scale wakeup granularity relative to nr_running
On Wed, Sep 22, 2021 at 08:22:43PM +0200, Vincent Guittot wrote:

> @@ -7161,6 +7162,13 @@ static void check_preempt_wakeup(struct rq *rq,
> struct task_struct *p, int wake_
> return;
>
> update_curr(cfs_rq_of(se));
> + delta_exec = se->sum_exec_runtime - se->prev_sum_exec_runtime;
> + /*
> + * Ensure that current got a chance to move forward
> + */
> + if (delta_exec < sysctl_sched_min_granularity)
> + return;
> +

I think we tried that at some point; IIRC the problem with this is that
if the interactive task fails to preempt, that preemption is lost. IOW
interactivity suffers.

Basically if you don't want wake-up preemptions, use SCHED_BATCH, then
those tasks will not preempt one another, but the SCHED_NORMAL tasks
will preempt them.

\
 
 \ /
  Last update: 2021-10-05 12:32    [W:1.765 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site