lkml.org 
[lkml]   [2021]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/6] sched: migration changes for core scheduling
On Mon, Mar 22, 2021 at 04:12:17PM +0800, Li, Aubrey wrote:

> > But suppose there is an imbalance; then this cookie crud can forever
> > stall balance.
> >
> > Imagine this cpu running a while(1); with a uniqie cookie on, then it
> > will _never_ accept other tasks == BAD.
> >
>
> How about putting the following check in sched_core_cookie_match()?
>
> + /*
> + * Ignore cookie match if there is a big imbalance between the src rq
> + * and dst rq.
> + */
> + if ((src_rq->cfs.h_nr_running - rq->cfs.h_nr_running) > 1)
> + return true;

That's just tinkering... cookie matching should not also look at
imbalance of any kind.

> Do you have any suggestions before we drop it?

Yeah, how about you make it part of task_hot() ? Have task_hot() refuse
migration it the cookie doesn't match.

task_hot() is a hint and will get ignored when appropriate.

\
 
 \ /
  Last update: 2021-03-22 10:00    [W:0.074 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site