Re: [PATCH] sched: wakeup buddy

2013-03-17 Thread Michael Wang
[snip] >> It could bring the same benefit but at lower overhead, what's the point >> of computing the same value over and over again? Also, the rate limit >> thing naturally works for the soft/hard-irq case. > > Just try to confirm my understanding, so we are going to do something > like: > >

Re: [PATCH] sched: wakeup buddy

2013-03-17 Thread Michael Wang
[snip] It could bring the same benefit but at lower overhead, what's the point of computing the same value over and over again? Also, the rate limit thing naturally works for the soft/hard-irq case. Just try to confirm my understanding, so we are going to do something like: if (now

Re: [PATCH] sched: wakeup buddy

2013-03-15 Thread Michael Wang
On 03/14/2013 06:58 PM, Peter Zijlstra wrote: > On Wed, 2013-03-13 at 11:07 +0800, Michael Wang wrote: > >> However, we already figure out the logical that wakeup related task >> could benefit from closely running, this could promise us somewhat >> reliable benefit. > > I'm not convinced that

Re: [PATCH] sched: wakeup buddy

2013-03-15 Thread Michael Wang
On 03/14/2013 06:58 PM, Peter Zijlstra wrote: On Wed, 2013-03-13 at 11:07 +0800, Michael Wang wrote: However, we already figure out the logical that wakeup related task could benefit from closely running, this could promise us somewhat reliable benefit. I'm not convinced that the 2 task

Re: [PATCH] sched: wakeup buddy

2013-03-14 Thread Peter Zijlstra
On Wed, 2013-03-13 at 11:07 +0800, Michael Wang wrote: > However, we already figure out the logical that wakeup related task > could benefit from closely running, this could promise us somewhat > reliable benefit. I'm not convinced that the 2 task wakeup scenario is the only sane scenario.

Re: [PATCH] sched: wakeup buddy

2013-03-14 Thread Peter Zijlstra
On Wed, 2013-03-13 at 11:07 +0800, Michael Wang wrote: However, we already figure out the logical that wakeup related task could benefit from closely running, this could promise us somewhat reliable benefit. I'm not convinced that the 2 task wakeup scenario is the only sane scenario. Imagine

Re: [PATCH] sched: wakeup buddy

2013-03-12 Thread Michael Wang
On 03/12/2013 06:08 PM, Peter Zijlstra wrote: > Does something simple like a per-task throttle of wake_affine() gain > similar benefits? Say something like only do wake_affine() once every > 10 ms or so (counting on the wakee, not waker). > > The rationale being that wake_affine() relies on

Re: [PATCH] sched: wakeup buddy

2013-03-12 Thread Peter Zijlstra
Does something simple like a per-task throttle of wake_affine() gain similar benefits? Say something like only do wake_affine() once every 10 ms or so (counting on the wakee, not waker). The rationale being that wake_affine() relies on load-balance statistics that aren't updated that much faster,

Re: [PATCH] sched: wakeup buddy

2013-03-12 Thread Michael Wang
On 03/12/2013 04:48 PM, Ingo Molnar wrote: [snip] >>> >>> Instrumentation/stats/profiling will also double check the correctness of >>> this data: if developers/users start relying on the work metric as a >>> substitute benchmark number, then app writers will have an additional >>> incentive to

Re: [PATCH] sched: wakeup buddy

2013-03-12 Thread Ingo Molnar
* Michael Wang wrote: > On 03/11/2013 05:40 PM, Ingo Molnar wrote: > > > > * Michael Wang wrote: > > > >> Hi, Ingo > >> > >> On 03/11/2013 04:21 PM, Ingo Molnar wrote: > >> [snip] > >>> > >>> I have actually written the prctl() approach before, for instrumentation > >>> purposes, and it

Re: [PATCH] sched: wakeup buddy

2013-03-12 Thread Michael Wang
On 03/11/2013 05:40 PM, Ingo Molnar wrote: > > * Michael Wang wrote: > >> Hi, Ingo >> >> On 03/11/2013 04:21 PM, Ingo Molnar wrote: >> [snip] >>> >>> I have actually written the prctl() approach before, for instrumentation >>> purposes, and it does wonders to system analysis. >> >> The idea

Re: [PATCH] sched: wakeup buddy

2013-03-12 Thread Michael Wang
On 03/11/2013 05:40 PM, Ingo Molnar wrote: * Michael Wang wang...@linux.vnet.ibm.com wrote: Hi, Ingo On 03/11/2013 04:21 PM, Ingo Molnar wrote: [snip] I have actually written the prctl() approach before, for instrumentation purposes, and it does wonders to system analysis. The idea

Re: [PATCH] sched: wakeup buddy

2013-03-12 Thread Ingo Molnar
* Michael Wang wang...@linux.vnet.ibm.com wrote: On 03/11/2013 05:40 PM, Ingo Molnar wrote: * Michael Wang wang...@linux.vnet.ibm.com wrote: Hi, Ingo On 03/11/2013 04:21 PM, Ingo Molnar wrote: [snip] I have actually written the prctl() approach before, for instrumentation

Re: [PATCH] sched: wakeup buddy

2013-03-12 Thread Michael Wang
On 03/12/2013 04:48 PM, Ingo Molnar wrote: [snip] Instrumentation/stats/profiling will also double check the correctness of this data: if developers/users start relying on the work metric as a substitute benchmark number, then app writers will have an additional incentive to make them

Re: [PATCH] sched: wakeup buddy

2013-03-12 Thread Peter Zijlstra
Does something simple like a per-task throttle of wake_affine() gain similar benefits? Say something like only do wake_affine() once every 10 ms or so (counting on the wakee, not waker). The rationale being that wake_affine() relies on load-balance statistics that aren't updated that much faster,

Re: [PATCH] sched: wakeup buddy

2013-03-12 Thread Michael Wang
On 03/12/2013 06:08 PM, Peter Zijlstra wrote: Does something simple like a per-task throttle of wake_affine() gain similar benefits? Say something like only do wake_affine() once every 10 ms or so (counting on the wakee, not waker). The rationale being that wake_affine() relies on

Re: [PATCH] sched: wakeup buddy

2013-03-11 Thread Michael Wang
On 03/11/2013 06:36 PM, Peter Zijlstra wrote: > On Fri, 2013-03-08 at 10:50 +0800, Michael Wang wrote: > >>> OK, so there's two issues I have with all this are: >>> >>> - it completely wrecks task placement for things like interrupts (sadly I >>> don't >>> have a good idea about a

Re: [PATCH] sched: wakeup buddy

2013-03-11 Thread Peter Zijlstra
On Fri, 2013-03-08 at 10:50 +0800, Michael Wang wrote: > > OK, so there's two issues I have with all this are: > > > > - it completely wrecks task placement for things like interrupts (sadly I > > don't > > have a good idea about a benchmark where this matters). > > I don't get this

Re: [PATCH] sched: wakeup buddy

2013-03-11 Thread Ingo Molnar
* Michael Wang wrote: > Hi, Ingo > > On 03/11/2013 04:21 PM, Ingo Molnar wrote: > [snip] > > > > I have actually written the prctl() approach before, for instrumentation > > purposes, and it does wonders to system analysis. > > The idea sounds great, we could get many new info to implement

Re: [PATCH] sched: wakeup buddy

2013-03-11 Thread Michael Wang
Hi, Ingo On 03/11/2013 04:21 PM, Ingo Molnar wrote: [snip] > > I have actually written the prctl() approach before, for instrumentation > purposes, and it does wonders to system analysis. The idea sounds great, we could get many new info to implement more smart scheduler, that's amazing :) >

Re: [PATCH] sched: wakeup buddy

2013-03-11 Thread Ingo Molnar
* Peter Zijlstra wrote: > On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: > > > wake_affine() stuff is trying to bind related tasks closely, but it > > doesn't work well according to the test on 'perf bench sched pipe' > > (thanks to Peter). > > so sched-pipe is a poor benchmark for

Re: [PATCH] sched: wakeup buddy

2013-03-11 Thread Ingo Molnar
* Peter Zijlstra a.p.zijls...@chello.nl wrote: On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: wake_affine() stuff is trying to bind related tasks closely, but it doesn't work well according to the test on 'perf bench sched pipe' (thanks to Peter). so sched-pipe is a poor

Re: [PATCH] sched: wakeup buddy

2013-03-11 Thread Michael Wang
Hi, Ingo On 03/11/2013 04:21 PM, Ingo Molnar wrote: [snip] I have actually written the prctl() approach before, for instrumentation purposes, and it does wonders to system analysis. The idea sounds great, we could get many new info to implement more smart scheduler, that's amazing :)

Re: [PATCH] sched: wakeup buddy

2013-03-11 Thread Ingo Molnar
* Michael Wang wang...@linux.vnet.ibm.com wrote: Hi, Ingo On 03/11/2013 04:21 PM, Ingo Molnar wrote: [snip] I have actually written the prctl() approach before, for instrumentation purposes, and it does wonders to system analysis. The idea sounds great, we could get many new info

Re: [PATCH] sched: wakeup buddy

2013-03-11 Thread Peter Zijlstra
On Fri, 2013-03-08 at 10:50 +0800, Michael Wang wrote: OK, so there's two issues I have with all this are: - it completely wrecks task placement for things like interrupts (sadly I don't have a good idea about a benchmark where this matters). I don't get this point...could

Re: [PATCH] sched: wakeup buddy

2013-03-11 Thread Michael Wang
On 03/11/2013 06:36 PM, Peter Zijlstra wrote: On Fri, 2013-03-08 at 10:50 +0800, Michael Wang wrote: OK, so there's two issues I have with all this are: - it completely wrecks task placement for things like interrupts (sadly I don't have a good idea about a benchmark where this

Re: [PATCH] sched: wakeup buddy

2013-03-10 Thread Michael Wang
On 03/08/2013 04:26 PM, Mike Galbraith wrote: > On Fri, 2013-03-08 at 15:30 +0800, Michael Wang wrote: >> On 03/08/2013 02:44 PM, Mike Galbraith wrote: > >>> In general, I think things would work better if we'd just rate limit how >>> frequently we can wakeup migrate each individual task. >>

Re: [PATCH] sched: wakeup buddy

2013-03-10 Thread Michael Wang
On 03/08/2013 04:26 PM, Mike Galbraith wrote: On Fri, 2013-03-08 at 15:30 +0800, Michael Wang wrote: On 03/08/2013 02:44 PM, Mike Galbraith wrote: In general, I think things would work better if we'd just rate limit how frequently we can wakeup migrate each individual task. Isn't the

Re: [PATCH] sched: wakeup buddy

2013-03-08 Thread Mike Galbraith
On Fri, 2013-03-08 at 15:30 +0800, Michael Wang wrote: > On 03/08/2013 02:44 PM, Mike Galbraith wrote: > > In general, I think things would work better if we'd just rate limit how > > frequently we can wakeup migrate each individual task. > > Isn't the wakeup buddy already limit the rate? and

Re: [PATCH] sched: wakeup buddy

2013-03-08 Thread Mike Galbraith
On Fri, 2013-03-08 at 15:30 +0800, Michael Wang wrote: On 03/08/2013 02:44 PM, Mike Galbraith wrote: In general, I think things would work better if we'd just rate limit how frequently we can wakeup migrate each individual task. Isn't the wakeup buddy already limit the rate? and by

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Michael Wang
On 03/08/2013 02:44 PM, Mike Galbraith wrote: > On Fri, 2013-03-08 at 10:37 +0800, Michael Wang wrote: >> On 03/07/2013 05:43 PM, Mike Galbraith wrote: >>> On Thu, 2013-03-07 at 09:36 +0100, Peter Zijlstra wrote: On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: >

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Mike Galbraith
On Fri, 2013-03-08 at 10:37 +0800, Michael Wang wrote: > On 03/07/2013 05:43 PM, Mike Galbraith wrote: > > On Thu, 2013-03-07 at 09:36 +0100, Peter Zijlstra wrote: > >> On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: > >> > >>> wake_affine() stuff is trying to bind related tasks closely,

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Michael Wang
On 03/08/2013 01:27 AM, Peter Zijlstra wrote: > On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: >> @@ -3351,7 +3420,13 @@ select_task_rq_fair(struct task_struct *p, int >> sd_flag, int wake_flags) >> } >> >> if (affine_sd) { >> - if (cpu != prev_cpu &&

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Michael Wang
On 03/07/2013 05:43 PM, Mike Galbraith wrote: > On Thu, 2013-03-07 at 09:36 +0100, Peter Zijlstra wrote: >> On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: >> >>> wake_affine() stuff is trying to bind related tasks closely, but it doesn't >>> work well according to the test on 'perf bench

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Michael Wang
On 03/08/2013 01:21 AM, Peter Zijlstra wrote: > On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: >> +static inline int wakeup_related(struct task_struct *p) >> +{ >> + if (wakeup_buddy(p, current)) { >> + /* >> +* Now check whether current still focus on

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Michael Wang
On 03/08/2013 12:52 AM, Peter Zijlstra wrote: > On Thu, 2013-03-07 at 17:46 +0800, Michael Wang wrote: > >> On 03/07/2013 04:36 PM, Peter Zijlstra wrote: >>> On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: >>> wake_affine() stuff is trying to bind related tasks closely, but it doesn't

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Peter Zijlstra
On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: > @@ -3351,7 +3420,13 @@ select_task_rq_fair(struct task_struct *p, int > sd_flag, int wake_flags) > } > > if (affine_sd) { > - if (cpu != prev_cpu && wake_affine(affine_sd, p, > sync)) > + /* > +

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Peter Zijlstra
On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: > +static inline int wakeup_related(struct task_struct *p) > +{ > + if (wakeup_buddy(p, current)) { > + /* > +* Now check whether current still focus on his buddy. > +*/ > + if

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Peter Zijlstra
On Thu, 2013-03-07 at 17:46 +0800, Michael Wang wrote: > On 03/07/2013 04:36 PM, Peter Zijlstra wrote: > > On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: > > > >> wake_affine() stuff is trying to bind related tasks closely, but it doesn't > >> work well according to the test on 'perf

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Michael Wang
Hi, Peter Thanks for your reply. On 03/07/2013 04:36 PM, Peter Zijlstra wrote: > On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: > >> wake_affine() stuff is trying to bind related tasks closely, but it doesn't >> work well according to the test on 'perf bench sched pipe' (thanks to

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Mike Galbraith
On Thu, 2013-03-07 at 09:36 +0100, Peter Zijlstra wrote: > On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: > > > wake_affine() stuff is trying to bind related tasks closely, but it doesn't > > work well according to the test on 'perf bench sched pipe' (thanks to > > Peter). > > so

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Peter Zijlstra
On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: > wake_affine() stuff is trying to bind related tasks closely, but it doesn't > work well according to the test on 'perf bench sched pipe' (thanks to Peter). so sched-pipe is a poor benchmark for this.. Ideally we'd write a new benchmark

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Michael Wang
On 03/08/2013 12:52 AM, Peter Zijlstra wrote: On Thu, 2013-03-07 at 17:46 +0800, Michael Wang wrote: On 03/07/2013 04:36 PM, Peter Zijlstra wrote: On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: wake_affine() stuff is trying to bind related tasks closely, but it doesn't work well

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Michael Wang
On 03/08/2013 01:21 AM, Peter Zijlstra wrote: On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: +static inline int wakeup_related(struct task_struct *p) +{ + if (wakeup_buddy(p, current)) { + /* +* Now check whether current still focus on his buddy.

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Michael Wang
On 03/07/2013 05:43 PM, Mike Galbraith wrote: On Thu, 2013-03-07 at 09:36 +0100, Peter Zijlstra wrote: On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: wake_affine() stuff is trying to bind related tasks closely, but it doesn't work well according to the test on 'perf bench sched pipe'

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Michael Wang
On 03/08/2013 01:27 AM, Peter Zijlstra wrote: On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: @@ -3351,7 +3420,13 @@ select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flags) } if (affine_sd) { - if (cpu != prev_cpu

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Mike Galbraith
On Fri, 2013-03-08 at 10:37 +0800, Michael Wang wrote: On 03/07/2013 05:43 PM, Mike Galbraith wrote: On Thu, 2013-03-07 at 09:36 +0100, Peter Zijlstra wrote: On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: wake_affine() stuff is trying to bind related tasks closely, but it

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Michael Wang
On 03/08/2013 02:44 PM, Mike Galbraith wrote: On Fri, 2013-03-08 at 10:37 +0800, Michael Wang wrote: On 03/07/2013 05:43 PM, Mike Galbraith wrote: On Thu, 2013-03-07 at 09:36 +0100, Peter Zijlstra wrote: On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: wake_affine() stuff is trying

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Peter Zijlstra
On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: wake_affine() stuff is trying to bind related tasks closely, but it doesn't work well according to the test on 'perf bench sched pipe' (thanks to Peter). so sched-pipe is a poor benchmark for this.. Ideally we'd write a new benchmark

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Mike Galbraith
On Thu, 2013-03-07 at 09:36 +0100, Peter Zijlstra wrote: On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: wake_affine() stuff is trying to bind related tasks closely, but it doesn't work well according to the test on 'perf bench sched pipe' (thanks to Peter). so sched-pipe is a

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Michael Wang
Hi, Peter Thanks for your reply. On 03/07/2013 04:36 PM, Peter Zijlstra wrote: On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: wake_affine() stuff is trying to bind related tasks closely, but it doesn't work well according to the test on 'perf bench sched pipe' (thanks to Peter).

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Peter Zijlstra
On Thu, 2013-03-07 at 17:46 +0800, Michael Wang wrote: On 03/07/2013 04:36 PM, Peter Zijlstra wrote: On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: wake_affine() stuff is trying to bind related tasks closely, but it doesn't work well according to the test on 'perf bench sched

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Peter Zijlstra
On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: +static inline int wakeup_related(struct task_struct *p) +{ + if (wakeup_buddy(p, current)) { + /* +* Now check whether current still focus on his buddy. +*/ + if

Re: [PATCH] sched: wakeup buddy

2013-03-07 Thread Peter Zijlstra
On Wed, 2013-03-06 at 15:06 +0800, Michael Wang wrote: @@ -3351,7 +3420,13 @@ select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flags) } if (affine_sd) { - if (cpu != prev_cpu wake_affine(affine_sd, p, sync)) + /* +

[PATCH] sched: wakeup buddy

2013-03-05 Thread Michael Wang
Log since RFC: 1. Small fix (thanks to Namhyung). 2. Remove the logical branch which will bind two task on same cpu (thanks to Mike). wake_affine() stuff is trying to bind related tasks closely, but it doesn't work well according to the test on 'perf bench sched pipe'

[PATCH] sched: wakeup buddy

2013-03-05 Thread Michael Wang
Log since RFC: 1. Small fix (thanks to Namhyung). 2. Remove the logical branch which will bind two task on same cpu (thanks to Mike). wake_affine() stuff is trying to bind related tasks closely, but it doesn't work well according to the test on 'perf bench sched pipe'

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Michael Wang
On 02/28/2013 11:31 PM, Namhyung Kim wrote: > 2013-02-28 (목), 11:06 +0100, Mike Galbraith: >> On Thu, 2013-02-28 at 18:25 +0900, Namhyung Kim wrote: >> >>> Not sure if it should require bidirectional relationship. Looks like >>> just for benchmarks. Isn't there a one-way relationship that could

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Michael Wang
Hi, Namhyung Thanks for your reply. On 02/28/2013 05:25 PM, Namhyung Kim wrote: [snip] >> Thus, if B is also the wakeup buddy of A, which means no other task has >> destroyed their relationship, then A is likely to benefit from the cached >> data of B, make them running closely is likely to gain

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Michael Wang
On 02/28/2013 05:18 PM, Mike Galbraith wrote: > On Thu, 2013-02-28 at 16:49 +0800, Michael Wang wrote: >> On 02/28/2013 04:24 PM, Mike Galbraith wrote: >>> On Thu, 2013-02-28 at 16:14 +0800, Michael Wang wrote: On 02/28/2013 04:04 PM, Mike Galbraith wrote: >>> > It would be nice if it

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Namhyung Kim
2013-02-28 (목), 11:06 +0100, Mike Galbraith: > On Thu, 2013-02-28 at 18:25 +0900, Namhyung Kim wrote: > > > Not sure if it should require bidirectional relationship. Looks like > > just for benchmarks. Isn't there a one-way relationship that could get > > a benefit from this? I don't know ;-)

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Mike Galbraith
On Thu, 2013-02-28 at 18:25 +0900, Namhyung Kim wrote: > Not sure if it should require bidirectional relationship. Looks like > just for benchmarks. Isn't there a one-way relationship that could get > a benefit from this? I don't know ;-) ?? Meaningful relationships are bare minimum

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Namhyung Kim
Hi Michael, On Thu, 28 Feb 2013 14:38:03 +0800, Michael Wang wrote: > wake_affine() stuff is trying to bind related tasks closely, but it doesn't > work well according to the test on 'perf bench sched pipe' (thanks to Peter). > > Besides, pgbench show that blindly using wake_affine() will eat a

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Mike Galbraith
On Thu, 2013-02-28 at 16:49 +0800, Michael Wang wrote: > On 02/28/2013 04:24 PM, Mike Galbraith wrote: > > On Thu, 2013-02-28 at 16:14 +0800, Michael Wang wrote: > >> On 02/28/2013 04:04 PM, Mike Galbraith wrote: > > > >>> It would be nice if it _were_ a promise, but it is not, it's a hint. >

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Michael Wang
On 02/28/2013 04:24 PM, Mike Galbraith wrote: > On Thu, 2013-02-28 at 16:14 +0800, Michael Wang wrote: >> On 02/28/2013 04:04 PM, Mike Galbraith wrote: > >>> It would be nice if it _were_ a promise, but it is not, it's a hint. >> >> Bad to know :( >> >> Should we fix it or this is by designed?

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Mike Galbraith
On Thu, 2013-02-28 at 16:14 +0800, Michael Wang wrote: > On 02/28/2013 04:04 PM, Mike Galbraith wrote: > > It would be nice if it _were_ a promise, but it is not, it's a hint. > > Bad to know :( > > Should we fix it or this is by designed? The comments after WF_SYNC > cheated me... You can't

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Michael Wang
On 02/28/2013 04:04 PM, Mike Galbraith wrote: > On Thu, 2013-02-28 at 15:40 +0800, Michael Wang wrote: >> Hi, Mike >> >> Thanks for your reply. >> >> On 02/28/2013 03:18 PM, Mike Galbraith wrote: >>> On Thu, 2013-02-28 at 14:38 +0800, Michael Wang wrote: >>> + /*

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Mike Galbraith
On Thu, 2013-02-28 at 15:42 +0800, Michael Wang wrote: > I mean could we say that more ops/sec means more works has been done? Sure. But it's fairly meaningless, it's all scheduler. Real tasks do more than schedule. -Mike -- To unsubscribe from this list: send the line "unsubscribe

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Mike Galbraith
On Thu, 2013-02-28 at 15:40 +0800, Michael Wang wrote: > Hi, Mike > > Thanks for your reply. > > On 02/28/2013 03:18 PM, Mike Galbraith wrote: > > On Thu, 2013-02-28 at 14:38 +0800, Michael Wang wrote: > > > >> + /* > >> + * current is the

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Mike Galbraith
On Thu, 2013-02-28 at 15:40 +0800, Michael Wang wrote: Hi, Mike Thanks for your reply. On 02/28/2013 03:18 PM, Mike Galbraith wrote: On Thu, 2013-02-28 at 14:38 +0800, Michael Wang wrote: + /* + * current is the only task on rq

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Mike Galbraith
On Thu, 2013-02-28 at 15:42 +0800, Michael Wang wrote: I mean could we say that more ops/sec means more works has been done? Sure. But it's fairly meaningless, it's all scheduler. Real tasks do more than schedule. -Mike -- To unsubscribe from this list: send the line unsubscribe

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Michael Wang
On 02/28/2013 04:04 PM, Mike Galbraith wrote: On Thu, 2013-02-28 at 15:40 +0800, Michael Wang wrote: Hi, Mike Thanks for your reply. On 02/28/2013 03:18 PM, Mike Galbraith wrote: On Thu, 2013-02-28 at 14:38 +0800, Michael Wang wrote: + /* +

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Mike Galbraith
On Thu, 2013-02-28 at 16:14 +0800, Michael Wang wrote: On 02/28/2013 04:04 PM, Mike Galbraith wrote: It would be nice if it _were_ a promise, but it is not, it's a hint. Bad to know :( Should we fix it or this is by designed? The comments after WF_SYNC cheated me... You can't fix it,

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Michael Wang
On 02/28/2013 04:24 PM, Mike Galbraith wrote: On Thu, 2013-02-28 at 16:14 +0800, Michael Wang wrote: On 02/28/2013 04:04 PM, Mike Galbraith wrote: It would be nice if it _were_ a promise, but it is not, it's a hint. Bad to know :( Should we fix it or this is by designed? The comments

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Mike Galbraith
On Thu, 2013-02-28 at 16:49 +0800, Michael Wang wrote: On 02/28/2013 04:24 PM, Mike Galbraith wrote: On Thu, 2013-02-28 at 16:14 +0800, Michael Wang wrote: On 02/28/2013 04:04 PM, Mike Galbraith wrote: It would be nice if it _were_ a promise, but it is not, it's a hint. Bad to know

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Namhyung Kim
Hi Michael, On Thu, 28 Feb 2013 14:38:03 +0800, Michael Wang wrote: wake_affine() stuff is trying to bind related tasks closely, but it doesn't work well according to the test on 'perf bench sched pipe' (thanks to Peter). Besides, pgbench show that blindly using wake_affine() will eat a lot

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Mike Galbraith
On Thu, 2013-02-28 at 18:25 +0900, Namhyung Kim wrote: Not sure if it should require bidirectional relationship. Looks like just for benchmarks. Isn't there a one-way relationship that could get a benefit from this? I don't know ;-) ?? Meaningful relationships are bare minimum

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Namhyung Kim
2013-02-28 (목), 11:06 +0100, Mike Galbraith: On Thu, 2013-02-28 at 18:25 +0900, Namhyung Kim wrote: Not sure if it should require bidirectional relationship. Looks like just for benchmarks. Isn't there a one-way relationship that could get a benefit from this? I don't know ;-) ??

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Michael Wang
On 02/28/2013 05:18 PM, Mike Galbraith wrote: On Thu, 2013-02-28 at 16:49 +0800, Michael Wang wrote: On 02/28/2013 04:24 PM, Mike Galbraith wrote: On Thu, 2013-02-28 at 16:14 +0800, Michael Wang wrote: On 02/28/2013 04:04 PM, Mike Galbraith wrote: It would be nice if it _were_ a promise,

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Michael Wang
Hi, Namhyung Thanks for your reply. On 02/28/2013 05:25 PM, Namhyung Kim wrote: [snip] Thus, if B is also the wakeup buddy of A, which means no other task has destroyed their relationship, then A is likely to benefit from the cached data of B, make them running closely is likely to gain

Re: [RFC PATCH] sched: wakeup buddy

2013-02-28 Thread Michael Wang
On 02/28/2013 11:31 PM, Namhyung Kim wrote: 2013-02-28 (목), 11:06 +0100, Mike Galbraith: On Thu, 2013-02-28 at 18:25 +0900, Namhyung Kim wrote: Not sure if it should require bidirectional relationship. Looks like just for benchmarks. Isn't there a one-way relationship that could get a

Re: [RFC PATCH] sched: wakeup buddy

2013-02-27 Thread Michael Wang
On 02/28/2013 03:40 PM, Michael Wang wrote: > Hi, Mike > > Thanks for your reply. > > On 02/28/2013 03:18 PM, Mike Galbraith wrote: >> On Thu, 2013-02-28 at 14:38 +0800, Michael Wang wrote: >> >>> + /* >>> +* current is the only task on rq

Re: [RFC PATCH] sched: wakeup buddy

2013-02-27 Thread Michael Wang
Hi, Mike Thanks for your reply. On 02/28/2013 03:18 PM, Mike Galbraith wrote: > On Thu, 2013-02-28 at 14:38 +0800, Michael Wang wrote: > >> +/* >> + * current is the only task on rq and it is >> + * going to

Re: [RFC PATCH] sched: wakeup buddy

2013-02-27 Thread Mike Galbraith
On Thu, 2013-02-28 at 14:38 +0800, Michael Wang wrote: > + /* > + * current is the only task on rq and it is > + * going to sleep, current cpu will be a nice > + * candidate for p to

[RFC PATCH] sched: wakeup buddy

2013-02-27 Thread Michael Wang
wake_affine() stuff is trying to bind related tasks closely, but it doesn't work well according to the test on 'perf bench sched pipe' (thanks to Peter). Besides, pgbench show that blindly using wake_affine() will eat a lot of performance. Thus, we need a new solution, it should detect the tasks

[RFC PATCH] sched: wakeup buddy

2013-02-27 Thread Michael Wang
wake_affine() stuff is trying to bind related tasks closely, but it doesn't work well according to the test on 'perf bench sched pipe' (thanks to Peter). Besides, pgbench show that blindly using wake_affine() will eat a lot of performance. Thus, we need a new solution, it should detect the tasks

Re: [RFC PATCH] sched: wakeup buddy

2013-02-27 Thread Mike Galbraith
On Thu, 2013-02-28 at 14:38 +0800, Michael Wang wrote: + /* + * current is the only task on rq and it is + * going to sleep, current cpu will be a nice + * candidate for p to run

Re: [RFC PATCH] sched: wakeup buddy

2013-02-27 Thread Michael Wang
Hi, Mike Thanks for your reply. On 02/28/2013 03:18 PM, Mike Galbraith wrote: On Thu, 2013-02-28 at 14:38 +0800, Michael Wang wrote: +/* + * current is the only task on rq and it is + * going to sleep,

Re: [RFC PATCH] sched: wakeup buddy

2013-02-27 Thread Michael Wang
On 02/28/2013 03:40 PM, Michael Wang wrote: Hi, Mike Thanks for your reply. On 02/28/2013 03:18 PM, Mike Galbraith wrote: On Thu, 2013-02-28 at 14:38 +0800, Michael Wang wrote: + /* +* current is the only task on rq and it is +