Re: [PATCH] sched/fair: Skip wake_affine() for core siblings

2015-09-30 Thread Kirill Tkhai
On 29.09.2015 20:29, Mike Galbraith wrote: > On Tue, 2015-09-29 at 19:00 +0300, Kirill Tkhai wrote: >> >> On 29.09.2015 17:55, Mike Galbraith wrote: >>> On Mon, 2015-09-28 at 18:36 +0300, Kirill Tkhai wrote: >>> --- diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 4df37

Re: [PATCH] sched/fair: Skip wake_affine() for core siblings

2015-09-29 Thread Mike Galbraith
On Tue, 2015-09-29 at 19:00 +0300, Kirill Tkhai wrote: > > On 29.09.2015 17:55, Mike Galbraith wrote: > > On Mon, 2015-09-28 at 18:36 +0300, Kirill Tkhai wrote: > > > >> --- > >> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > >> index 4df37a4..dfbe06b 100644 > >> --- a/kernel/sched/fair

Re: [PATCH] sched/fair: Skip wake_affine() for core siblings

2015-09-29 Thread Kirill Tkhai
On 29.09.2015 19:00, Kirill Tkhai wrote: > > > On 29.09.2015 17:55, Mike Galbraith wrote: >> On Mon, 2015-09-28 at 18:36 +0300, Kirill Tkhai wrote: >> >>> --- >>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c >>> index 4df37a4..dfbe06b 100644 >>> --- a/kernel/sched/fair.c >>> +++ b/ker

Re: [PATCH] sched/fair: Skip wake_affine() for core siblings

2015-09-29 Thread Kirill Tkhai
On 29.09.2015 17:55, Mike Galbraith wrote: > On Mon, 2015-09-28 at 18:36 +0300, Kirill Tkhai wrote: > >> --- >> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c >> index 4df37a4..dfbe06b 100644 >> --- a/kernel/sched/fair.c >> +++ b/kernel/sched/fair.c >> @@ -4930,8 +4930,13 @@ select_task_

Re: [PATCH] sched/fair: Skip wake_affine() for core siblings

2015-09-29 Thread Mike Galbraith
On Mon, 2015-09-28 at 18:36 +0300, Kirill Tkhai wrote: > --- > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 4df37a4..dfbe06b 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -4930,8 +4930,13 @@ select_task_rq_fair(struct task_struct *p, int > prev_cpu, int sd_

Re: [PATCH] sched/fair: Skip wake_affine() for core siblings

2015-09-28 Thread Mike Galbraith
On Mon, 2015-09-28 at 22:19 +0300, Kirill Tkhai wrote: > >> Imagine a situation, when we share a mutex > >> with a task on another NUMA node. When the task is realising the mutex > >> it is waking us, but we definitelly won't use affine logic in this case. > > > > Why not? A wakeup is a wakeup i

Re: [PATCH] sched/fair: Skip wake_affine() for core siblings

2015-09-28 Thread Kirill Tkhai
On 28.09.2015 21:22, Mike Galbraith wrote: > On Mon, 2015-09-28 at 18:36 +0300, Kirill Tkhai wrote: > >> Mike, one more moment. wake_wide() and current logic confuses me a bit. >> It makes us to decide if we want affine wakeup or not, but >> select_idle_sibling() >> if a function is not for cho

Re: [PATCH] sched/fair: Skip wake_affine() for core siblings

2015-09-28 Thread Mike Galbraith
On Mon, 2015-09-28 at 18:36 +0300, Kirill Tkhai wrote: > Mike, one more moment. wake_wide() and current logic confuses me a bit. > It makes us to decide if we want affine wakeup or not, but > select_idle_sibling() > if a function is not for choosing this_cpu's llc domain only. We use it > for sea

Re: [PATCH] sched/fair: Skip wake_affine() for core siblings

2015-09-28 Thread Kirill Tkhai
On 28.09.2015 18:36, Kirill Tkhai wrote: > On 28.09.2015 16:12, Mike Galbraith wrote: >> On Mon, 2015-09-28 at 13:28 +0300, Kirill Tkhai wrote: >> >>> Looks like, NAK may be better, because it saves L1 cache, while the patch >>> always invalidates it. >> >> Yeah, bounce hurts more when there's n

Re: [PATCH] sched/fair: Skip wake_affine() for core siblings

2015-09-28 Thread Kirill Tkhai
On 28.09.2015 16:12, Mike Galbraith wrote: > On Mon, 2015-09-28 at 13:28 +0300, Kirill Tkhai wrote: > >> Looks like, NAK may be better, because it saves L1 cache, while the patch >> always invalidates it. > > Yeah, bounce hurts more when there's no concurrency win waiting to be > collected. Thi

Re: [PATCH] sched/fair: Skip wake_affine() for core siblings

2015-09-28 Thread Mike Galbraith
On Mon, 2015-09-28 at 13:28 +0300, Kirill Tkhai wrote: > Looks like, NAK may be better, because it saves L1 cache, while the patch > always invalidates it. Yeah, bounce hurts more when there's no concurrency win waiting to be collected. This mixed load wasn't a great choice, but it turned out t

Re: [PATCH] sched/fair: Skip wake_affine() for core siblings

2015-09-28 Thread Kirill Tkhai
On 26.09.2015 18:25, Mike Galbraith wrote: > On Fri, 2015-09-25 at 20:54 +0300, Kirill Tkhai wrote: >> We are not interested in actual target if both prev >> and curr cpus share CPU cache. select_idle_sibling() >> searches in top-down order; top level is the same >> for both of them, and the resul

Re: [PATCH] sched/fair: Skip wake_affine() for core siblings

2015-09-26 Thread Mike Galbraith
On Fri, 2015-09-25 at 20:54 +0300, Kirill Tkhai wrote: > We are not interested in actual target if both prev > and curr cpus share CPU cache. select_idle_sibling() > searches in top-down order; top level is the same > for both of them, and the result will be the same. > So, we can save a little CPU