Re: [RFC][PATCH 15/16] sched: Trivial forced-newidle balancer

2019-04-05 Thread Aubrey Li
On Thu, Apr 4, 2019 at 4:31 PM Aubrey Li wrote: > > On Fri, Feb 22, 2019 at 12:42 AM Peter Zijlstra wrote: > > > > On Thu, Feb 21, 2019 at 04:19:46PM +, Valentin Schneider wrote: > > > Hi, > > > > > > On 18/02/2019 16:56, Peter Zijlstra wrote: > > > [...] > > > > +static bool try_steal_cookie

Re: [RFC][PATCH 15/16] sched: Trivial forced-newidle balancer

2019-04-04 Thread Aubrey Li
On Fri, Feb 22, 2019 at 12:42 AM Peter Zijlstra wrote: > > On Thu, Feb 21, 2019 at 04:19:46PM +, Valentin Schneider wrote: > > Hi, > > > > On 18/02/2019 16:56, Peter Zijlstra wrote: > > [...] > > > +static bool try_steal_cookie(int this, int that) > > > +{ > > > + struct rq *dst = cpu_rq(thi

Re: [RFC][PATCH 15/16] sched: Trivial forced-newidle balancer

2019-02-21 Thread Valentin Schneider
On 21/02/2019 16:47, Peter Zijlstra wrote: [...] >>> IIUC, we're trying to find/steal tasks matching the core_cookie from other >>> rqs because dst has been cookie-forced-idle. >>> >>> If the p we find isn't running, what's the meaning of core_occupation? >>> I would have expected it to be 0, but w

Re: [RFC][PATCH 15/16] sched: Trivial forced-newidle balancer

2019-02-21 Thread Peter Zijlstra
On Thu, Feb 21, 2019 at 05:41:46PM +0100, Peter Zijlstra wrote: > On Thu, Feb 21, 2019 at 04:19:46PM +, Valentin Schneider wrote: > > Hi, > > > > On 18/02/2019 16:56, Peter Zijlstra wrote: > > [...] > > > +static bool try_steal_cookie(int this, int that) > > > +{ > > > + struct rq *dst = cpu_r

Re: [RFC][PATCH 15/16] sched: Trivial forced-newidle balancer

2019-02-21 Thread Peter Zijlstra
On Thu, Feb 21, 2019 at 04:19:46PM +, Valentin Schneider wrote: > Hi, > > On 18/02/2019 16:56, Peter Zijlstra wrote: > [...] > > +static bool try_steal_cookie(int this, int that) > > +{ > > + struct rq *dst = cpu_rq(this), *src = cpu_rq(that); > > + struct task_struct *p; > > + unsigned

Re: [RFC][PATCH 15/16] sched: Trivial forced-newidle balancer

2019-02-21 Thread Valentin Schneider
Hi, On 18/02/2019 16:56, Peter Zijlstra wrote: [...] > +static bool try_steal_cookie(int this, int that) > +{ > + struct rq *dst = cpu_rq(this), *src = cpu_rq(that); > + struct task_struct *p; > + unsigned long cookie; > + bool success = false; > + > + local_irq_disable(); > +