Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-07 Thread Alex Shi
On 05/07/2013 01:43 PM, Alex Shi wrote: >> > This also brings forth another question,should we modify wake_affine() >> > to pass the runnable load average of the waking up task to >> > effective_load(). >> > >> > What do you think? > I am not Paul. :) > > The acceptable patch of pgbench

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Alex Shi
On 05/06/2013 05:59 PM, Preeti U Murthy wrote: > Suggestion1: Would change the CPU share calculation to use runnable load > average all the time. > > Suggestion2: Did opposite of point 2 above,it used runnable load average > while calculating the CPU share *before* a new task has been woken up >

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Michael Wang
On 05/06/2013 05:59 PM, Preeti U Murthy wrote: > On 05/06/2013 03:05 PM, Alex Shi wrote: >> On 05/06/2013 05:06 PM, Paul Turner wrote: >>> I don't think this is a good idea: >>> >>> The problem with not using the instantaneous weight here is that you >>> potentially penalize the latency of

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Preeti U Murthy
On 05/06/2013 03:05 PM, Alex Shi wrote: > On 05/06/2013 05:06 PM, Paul Turner wrote: >> I don't think this is a good idea: >> >> The problem with not using the instantaneous weight here is that you >> potentially penalize the latency of interactive tasks (similarly, >> potentially important

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Preeti U Murthy
Hi Alex,Michael, Can you try out the below patch and check? I have the reason mentioned in the changelog. If this also causes performance regression,you probably need to remove changes made in effective_load() as Michael points out. I believe the below patch should not cause performance

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Michael Wang
Hi, Preeti On 05/06/2013 03:10 PM, Preeti U Murthy wrote: > Hi Alex,Michael, > > Can you try out the below patch and check? Sure, I will take a try also. I have the reason mentioned in the changelog. > If this also causes performance regression,you probably need to remove > changes made in >

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Paul Turner
On Mon, May 6, 2013 at 2:35 AM, Alex Shi wrote: > On 05/06/2013 05:06 PM, Paul Turner wrote: >> I don't think this is a good idea: >> >> The problem with not using the instantaneous weight here is that you >> potentially penalize the latency of interactive tasks (similarly, >> potentially

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Alex Shi
> > But actually I'm wondering whether it is necessary to change > effective_load()? > > It is only severed for wake-affine and the whole stuff is still in the > dark, if patch 1~6 already show good results, why don't we leave it there? It is used for pipe connected process, and your testing

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Alex Shi
On 05/06/2013 05:06 PM, Paul Turner wrote: > I don't think this is a good idea: > > The problem with not using the instantaneous weight here is that you > potentially penalize the latency of interactive tasks (similarly, > potentially important background threads -- e.g. garbage collection). > >

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Michael Wang
On 05/06/2013 01:39 PM, Alex Shi wrote: > On 05/06/2013 11:34 AM, Michael Wang wrote: @@ -3045,7 +3045,7 @@ static long effective_load(struct task_group *tg, int cpu, long wl, long wg) /* * w = rw_i + @wl */ - w =

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Paul Turner
I don't think this is a good idea: The problem with not using the instantaneous weight here is that you potentially penalize the latency of interactive tasks (similarly, potentially important background threads -- e.g. garbage collection). Counter-intuitively we actually want such tasks on the

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Michael Wang
On 05/06/2013 04:02 PM, Alex Shi wrote: > On 05/06/2013 03:49 PM, Michael Wang wrote: >> On 05/06/2013 01:39 PM, Alex Shi wrote: >> [snip] >> >> Rough test done: >> >>> >>> 1, change back the tg_weight in calc_tg_weight() to use tg_load_contrib not >>> direct load. >> >> This way stop the

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Alex Shi
On 05/06/2013 03:49 PM, Michael Wang wrote: > On 05/06/2013 01:39 PM, Alex Shi wrote: > [snip] > > Rough test done: > >> >> 1, change back the tg_weight in calc_tg_weight() to use tg_load_contrib not >> direct load. > > This way stop the regression of patch 7. > >> >> diff --git

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Michael Wang
On 05/06/2013 01:39 PM, Alex Shi wrote: [snip] Rough test done: > > 1, change back the tg_weight in calc_tg_weight() to use tg_load_contrib not > direct load. This way stop the regression of patch 7. > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 6f4f14b..c770f8d 100644

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Alex Shi
On 05/06/2013 05:59 PM, Preeti U Murthy wrote: Suggestion1: Would change the CPU share calculation to use runnable load average all the time. Suggestion2: Did opposite of point 2 above,it used runnable load average while calculating the CPU share *before* a new task has been woken up while

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Michael Wang
On 05/06/2013 01:39 PM, Alex Shi wrote: [snip] Rough test done: 1, change back the tg_weight in calc_tg_weight() to use tg_load_contrib not direct load. This way stop the regression of patch 7. diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 6f4f14b..c770f8d 100644 ---

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Alex Shi
On 05/06/2013 03:49 PM, Michael Wang wrote: On 05/06/2013 01:39 PM, Alex Shi wrote: [snip] Rough test done: 1, change back the tg_weight in calc_tg_weight() to use tg_load_contrib not direct load. This way stop the regression of patch 7. diff --git a/kernel/sched/fair.c

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Michael Wang
On 05/06/2013 04:02 PM, Alex Shi wrote: On 05/06/2013 03:49 PM, Michael Wang wrote: On 05/06/2013 01:39 PM, Alex Shi wrote: [snip] Rough test done: 1, change back the tg_weight in calc_tg_weight() to use tg_load_contrib not direct load. This way stop the regression of patch 7. diff

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Paul Turner
I don't think this is a good idea: The problem with not using the instantaneous weight here is that you potentially penalize the latency of interactive tasks (similarly, potentially important background threads -- e.g. garbage collection). Counter-intuitively we actually want such tasks on the

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Michael Wang
On 05/06/2013 01:39 PM, Alex Shi wrote: On 05/06/2013 11:34 AM, Michael Wang wrote: @@ -3045,7 +3045,7 @@ static long effective_load(struct task_group *tg, int cpu, long wl, long wg) /* * w = rw_i + @wl */ - w = se-my_q-load.weight + wl; +

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Alex Shi
On 05/06/2013 05:06 PM, Paul Turner wrote: I don't think this is a good idea: The problem with not using the instantaneous weight here is that you potentially penalize the latency of interactive tasks (similarly, potentially important background threads -- e.g. garbage collection).

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Alex Shi
But actually I'm wondering whether it is necessary to change effective_load()? It is only severed for wake-affine and the whole stuff is still in the dark, if patch 1~6 already show good results, why don't we leave it there? It is used for pipe connected process, and your testing showed

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Paul Turner
On Mon, May 6, 2013 at 2:35 AM, Alex Shi alex@intel.com wrote: On 05/06/2013 05:06 PM, Paul Turner wrote: I don't think this is a good idea: The problem with not using the instantaneous weight here is that you potentially penalize the latency of interactive tasks (similarly, potentially

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Michael Wang
Hi, Preeti On 05/06/2013 03:10 PM, Preeti U Murthy wrote: Hi Alex,Michael, Can you try out the below patch and check? Sure, I will take a try also. I have the reason mentioned in the changelog. If this also causes performance regression,you probably need to remove changes made in

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Preeti U Murthy
Hi Alex,Michael, Can you try out the below patch and check? I have the reason mentioned in the changelog. If this also causes performance regression,you probably need to remove changes made in effective_load() as Michael points out. I believe the below patch should not cause performance

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-06 Thread Preeti U Murthy
On 05/06/2013 03:05 PM, Alex Shi wrote: On 05/06/2013 05:06 PM, Paul Turner wrote: I don't think this is a good idea: The problem with not using the instantaneous weight here is that you potentially penalize the latency of interactive tasks (similarly, potentially important background

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-05 Thread Alex Shi
On 05/06/2013 11:34 AM, Michael Wang wrote: >> > @@ -3045,7 +3045,7 @@ static long effective_load(struct task_group *tg, >> > int cpu, long wl, long wg) >> >/* >> > * w = rw_i + @wl >> > */ >> > - w = se->my_q->load.weight + wl; >> > + w =

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-05 Thread Michael Wang
Hi, Alex On 05/06/2013 09:45 AM, Alex Shi wrote: > effective_load calculates the load change as seen from the > root_task_group. It needs to engage the runnable average > of changed task. [snip] > */ > @@ -3045,7 +3045,7 @@ static long effective_load(struct task_group *tg, int > cpu, long wl,

[PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-05 Thread Alex Shi
effective_load calculates the load change as seen from the root_task_group. It needs to engage the runnable average of changed task. Thanks for Morten Rasmussen and PeterZ's reminder of this. Signed-off-by: Alex Shi --- kernel/sched/fair.c | 24 1 file changed, 12

[PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-05 Thread Alex Shi
effective_load calculates the load change as seen from the root_task_group. It needs to engage the runnable average of changed task. Thanks for Morten Rasmussen and PeterZ's reminder of this. Signed-off-by: Alex Shi alex@intel.com --- kernel/sched/fair.c | 24 1

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-05 Thread Michael Wang
Hi, Alex On 05/06/2013 09:45 AM, Alex Shi wrote: effective_load calculates the load change as seen from the root_task_group. It needs to engage the runnable average of changed task. [snip] */ @@ -3045,7 +3045,7 @@ static long effective_load(struct task_group *tg, int cpu, long wl, long

Re: [PATCH v5 7/7] sched: consider runnable load average in effective_load

2013-05-05 Thread Alex Shi
On 05/06/2013 11:34 AM, Michael Wang wrote: @@ -3045,7 +3045,7 @@ static long effective_load(struct task_group *tg, int cpu, long wl, long wg) /* * w = rw_i + @wl */ - w = se-my_q-load.weight + wl; + w = se-my_q-tg_load_contrib +