Re: [PATCH updated v2] sched/fair: core wide cfs task priority comparison

2020-06-07 Thread Ning, Hongyu
On 2020/5/14 21:02, Peter Zijlstra wrote: > On Fri, May 08, 2020 at 08:34:57PM +0800, Aaron Lu wrote: >> With this said, I realized a workaround for the issue described above: >> when the core went from 'compatible mode'(step 1-3) to 'incompatible >> mode'(step 4), reset all root level sched

Re: [PATCH updated v2] sched/fair: core wide cfs task priority comparison

2020-05-22 Thread Aaron Lu
On Sat, May 16, 2020 at 11:42:30AM +0800, Aaron Lu wrote: > On Thu, May 14, 2020 at 03:02:48PM +0200, Peter Zijlstra wrote: > > --- a/kernel/sched/core.c > > +++ b/kernel/sched/core.c > > @@ -4476,6 +4473,16 @@ next_class:; > > WARN_ON_ONCE(!cookie_match(next, rq_i->core_pick)); > >

Re: [PATCH updated v2] sched/fair: core wide cfs task priority comparison

2020-05-15 Thread Aaron Lu
On Thu, May 14, 2020 at 03:02:48PM +0200, Peter Zijlstra wrote: > On Fri, May 08, 2020 at 08:34:57PM +0800, Aaron Lu wrote: > > With this said, I realized a workaround for the issue described above: > > when the core went from 'compatible mode'(step 1-3) to 'incompatible > > mode'(step 4), reset

Re: [PATCH updated v2] sched/fair: core wide cfs task priority comparison

2020-05-15 Thread Vineeth Remanan Pillai
On Fri, May 15, 2020 at 6:39 AM Peter Zijlstra wrote: > > It's complicated ;-) > > So this sync is basically a relative reset of S to 0. > > So with 2 queues, when one goes idle, we drop them both to 0 and one > then increases due to not being idle, and the idle one builds up lag to > get

Re: [PATCH updated v2] sched/fair: core wide cfs task priority comparison

2020-05-15 Thread Peter Zijlstra
On Fri, May 15, 2020 at 12:38:44PM +0200, Peter Zijlstra wrote: > less := !((s64)(s_a - s_b) <= 0) > > (v_a - S_a) - (v_b - S_b) == v_a - v_b - S_a + S_b > == v_a - (v_b - S_a + S_b) > > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -469,7 +469,7 @@

Re: [PATCH updated v2] sched/fair: core wide cfs task priority comparison

2020-05-15 Thread Peter Zijlstra
On Thu, May 14, 2020 at 06:51:27PM -0400, Vineeth Remanan Pillai wrote: > On Thu, May 14, 2020 at 9:02 AM Peter Zijlstra wrote: > > > > A little something like so, this syncs min_vruntime when we switch to > > single queue mode. This is very much SMT2 only, I got my head in twist > > when

Re: [PATCH updated v2] sched/fair: core wide cfs task priority comparison

2020-05-14 Thread Vineeth Remanan Pillai
Hi Peter, On Thu, May 14, 2020 at 9:02 AM Peter Zijlstra wrote: > > A little something like so, this syncs min_vruntime when we switch to > single queue mode. This is very much SMT2 only, I got my head in twist > when thikning about more siblings, I'll have to try again later. > Thanks for the

Re: [PATCH updated v2] sched/fair: core wide cfs task priority comparison

2020-05-14 Thread Peter Zijlstra
On Fri, May 08, 2020 at 08:34:57PM +0800, Aaron Lu wrote: > With this said, I realized a workaround for the issue described above: > when the core went from 'compatible mode'(step 1-3) to 'incompatible > mode'(step 4), reset all root level sched entities' vruntime to be the > same as the core wide

Re: [PATCH updated v2] sched/fair: core wide cfs task priority comparison

2020-05-08 Thread Aaron Lu
On Fri, May 08, 2020 at 11:09:25AM +0200, Peter Zijlstra wrote: > On Fri, May 08, 2020 at 04:44:19PM +0800, Aaron Lu wrote: > > On Wed, May 06, 2020 at 04:35:06PM +0200, Peter Zijlstra wrote: > > > > Aside from this being way to complicated for what it does -- you > > > could've saved the

Re: [PATCH updated v2] sched/fair: core wide cfs task priority comparison

2020-05-08 Thread Peter Zijlstra
On Fri, May 08, 2020 at 04:44:19PM +0800, Aaron Lu wrote: > On Wed, May 06, 2020 at 04:35:06PM +0200, Peter Zijlstra wrote: > > Aside from this being way to complicated for what it does -- you > > could've saved the min_vruntime for each rq and compared them with > > subtraction -- it is also

Re: [PATCH updated v2] sched/fair: core wide cfs task priority comparison

2020-05-08 Thread Aaron Lu
On Wed, May 06, 2020 at 04:35:06PM +0200, Peter Zijlstra wrote: > > Sorry for being verbose; I've been procrastinating replying, and in > doing so the things I wanted to say kept growing. > > On Fri, Apr 24, 2020 at 10:24:43PM +0800, Aaron Lu wrote: > > > To make this work, the root level sched

Re: [PATCH updated v2] sched/fair: core wide cfs task priority comparison

2020-05-06 Thread Peter Zijlstra
Sorry for being verbose; I've been procrastinating replying, and in doing so the things I wanted to say kept growing. On Fri, Apr 24, 2020 at 10:24:43PM +0800, Aaron Lu wrote: > To make this work, the root level sched entities' vruntime of the two > threads must be directly comparable. So one