All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Performance regression of specjbb2005/aim7 with 2.6.29-rc1
@ 2009-01-13  8:57 Zhang, Yanmin
  2009-01-13  9:37 ` Mike Galbraith
  0 siblings, 1 reply; 10+ messages in thread
From: Zhang, Yanmin @ 2009-01-13  8:57 UTC (permalink / raw
  To: Mike Galbraith; +Cc: LKML, ming.m.lin, Peter Zijlstra

Comparing with 2.6.28's results, specjbb2005 has about 7% regression with 2.6.29-rc1
on my a couple of x86_64 machines. aim7 has about 1.7% regression.

Ming did a quick bisect with aim7 and located below patch.

commit 0a582440ff546e2c6610d1acec325e91b4efd313
Author: Mike Galbraith <efault@gmx.de>
Date:   Fri Jan 2 12:16:42 2009 +0100

    sched: fix sched_slice()
    
    Impact: fix bad-interactivity buglet
    
    Fix sched_slice() to emit a sane result whether a task is currently
    enqueued or not.
    
    Signed-off-by: Mike Galbraith <efault@gmx.de>
    Tested-by: Jayson King <dev@jaysonking.com>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>


After we revert the patch, aim7 regression disappeared. specjbb2005 regression becomes
less than 1.5% on 8-core stokley and disappears on 16-core tigerton. I don't know what
causes the last 1.5% regression.

As tbench has about 5% improvement and oltp(mysql+sysbench) has 5% improvement, we also tested
to make sure such improvement isn't related to above patch. volanoMark's improvement is also not
related to the patch. So it seems safe to revert it.

yanmin




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Performance regression of specjbb2005/aim7 with 2.6.29-rc1
  2009-01-13  8:57 Performance regression of specjbb2005/aim7 with 2.6.29-rc1 Zhang, Yanmin
@ 2009-01-13  9:37 ` Mike Galbraith
  2009-01-15  2:30   ` Lin Ming
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Galbraith @ 2009-01-13  9:37 UTC (permalink / raw
  To: Zhang, Yanmin; +Cc: LKML, ming.m.lin, Peter Zijlstra

On Tue, 2009-01-13 at 16:57 +0800, Zhang, Yanmin wrote:
> Comparing with 2.6.28's results, specjbb2005 has about 7% regression with 2.6.29-rc1
> on my a couple of x86_64 machines. aim7 has about 1.7% regression.
> 
> Ming did a quick bisect with aim7 and located below patch.
> 
> commit 0a582440ff546e2c6610d1acec325e91b4efd313
> Author: Mike Galbraith <efault@gmx.de>
> Date:   Fri Jan 2 12:16:42 2009 +0100
> 
>     sched: fix sched_slice()
>     
>     Impact: fix bad-interactivity buglet
>     
>     Fix sched_slice() to emit a sane result whether a task is currently
>     enqueued or not.
>     
>     Signed-off-by: Mike Galbraith <efault@gmx.de>
>     Tested-by: Jayson King <dev@jaysonking.com>
>     Signed-off-by: Ingo Molnar <mingo@elte.hu>
> 
> 
> After we revert the patch, aim7 regression disappeared. specjbb2005 regression becomes
> less than 1.5% on 8-core stokley and disappears on 16-core tigerton. I don't know what
> causes the last 1.5% regression.
> 
> As tbench has about 5% improvement and oltp(mysql+sysbench) has 5% improvement, we also tested
> to make sure such improvement isn't related to above patch. volanoMark's improvement is also not
> related to the patch. So it seems safe to revert it.

No, it's not safe to just revert.  You can replace it with something
else, but as long as sched_slice() is called for unqueued tasks, it must
emit sane slices, otherwise you can experience a latency-hit-from-hell.

See thread: problem with "sched: revert back to per-rq vruntime"?

	-Mike


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Performance regression of specjbb2005/aim7 with 2.6.29-rc1
  2009-01-13  9:37 ` Mike Galbraith
@ 2009-01-15  2:30   ` Lin Ming
  2009-01-15  7:36     ` Peter Zijlstra
                       ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Lin Ming @ 2009-01-15  2:30 UTC (permalink / raw
  To: Mike Galbraith; +Cc: Zhang, Yanmin, dev, LKML, Peter Zijlstra

On Tue, 2009-01-13 at 17:37 +0800, Mike Galbraith wrote:
> On Tue, 2009-01-13 at 16:57 +0800, Zhang, Yanmin wrote:
> > Comparing with 2.6.28's results, specjbb2005 has about 7% regression with 2.6.29-rc1
> > on my a couple of x86_64 machines. aim7 has about 1.7% regression.
> > 
> > Ming did a quick bisect with aim7 and located below patch.
> > 
> > commit 0a582440ff546e2c6610d1acec325e91b4efd313
> > Author: Mike Galbraith <efault@gmx.de>
> > Date:   Fri Jan 2 12:16:42 2009 +0100
> > 
> >     sched: fix sched_slice()
> >     
> >     Impact: fix bad-interactivity buglet
> >     
> >     Fix sched_slice() to emit a sane result whether a task is currently
> >     enqueued or not.
> >     
> >     Signed-off-by: Mike Galbraith <efault@gmx.de>
> >     Tested-by: Jayson King <dev@jaysonking.com>
> >     Signed-off-by: Ingo Molnar <mingo@elte.hu>
> > 
> > 
> > After we revert the patch, aim7 regression disappeared. specjbb2005 regression becomes
> > less than 1.5% on 8-core stokley and disappears on 16-core tigerton. I don't know what
> > causes the last 1.5% regression.
> > 
> > As tbench has about 5% improvement and oltp(mysql+sysbench) has 5% improvement, we also tested
> > to make sure such improvement isn't related to above patch. volanoMark's improvement is also not
> > related to the patch. So it seems safe to revert it.
> 
> No, it's not safe to just revert.  You can replace it with something
> else, but as long as sched_slice() is called for unqueued tasks, it must
> emit sane slices, otherwise you can experience a latency-hit-from-hell.
> 
> See thread: problem with "sched: revert back to per-rq vruntime"?

Below patch fixes aim7 regression and specjbb2005 regression becomes
less than 1.5% on 8-core stokley.

Jayson,
Mike's patch fixed the latency problem you reported
would you please help to test this patch to see if it still works fine now?

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 8e1352c..617e54c 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -429,10 +429,10 @@ static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)
 	u64 slice = __sched_period(cfs_rq->nr_running + !se->on_rq);
 
 	for_each_sched_entity(se) {
-		struct load_weight *load = &cfs_rq->load;
+		struct load_weight *load = &cfs_rq_of(se)->load;
 
 		if (unlikely(!se->on_rq)) {
-			struct load_weight lw = cfs_rq->load;
+			struct load_weight lw = cfs_rq_of(se)->load;
 
 			update_load_add(&lw, se->load.weight);
 			load = &lw;


Thanks,
Lin Ming


> 
> 	-Mike
> 


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: Performance regression of specjbb2005/aim7 with 2.6.29-rc1
  2009-01-15  2:30   ` Lin Ming
@ 2009-01-15  7:36     ` Peter Zijlstra
  2009-01-15 15:10     ` Peter Zijlstra
  2009-01-15 16:17     ` Peter Zijlstra
  2 siblings, 0 replies; 10+ messages in thread
From: Peter Zijlstra @ 2009-01-15  7:36 UTC (permalink / raw
  To: Lin Ming; +Cc: Mike Galbraith, Zhang, Yanmin, dev, LKML

On Thu, 2009-01-15 at 10:30 +0800, Lin Ming wrote:
> On Tue, 2009-01-13 at 17:37 +0800, Mike Galbraith wrote:
> > On Tue, 2009-01-13 at 16:57 +0800, Zhang, Yanmin wrote:
> > > Comparing with 2.6.28's results, specjbb2005 has about 7% regression with 2.6.29-rc1
> > > on my a couple of x86_64 machines. aim7 has about 1.7% regression.
> > > 
> > > Ming did a quick bisect with aim7 and located below patch.
> > > 
> > > commit 0a582440ff546e2c6610d1acec325e91b4efd313
> > > Author: Mike Galbraith <efault@gmx.de>
> > > Date:   Fri Jan 2 12:16:42 2009 +0100
> > > 
> > >     sched: fix sched_slice()
> > >     
> > >     Impact: fix bad-interactivity buglet
> > >     
> > >     Fix sched_slice() to emit a sane result whether a task is currently
> > >     enqueued or not.
> > >     
> > >     Signed-off-by: Mike Galbraith <efault@gmx.de>
> > >     Tested-by: Jayson King <dev@jaysonking.com>
> > >     Signed-off-by: Ingo Molnar <mingo@elte.hu>
> > > 
> > > 
> > > After we revert the patch, aim7 regression disappeared. specjbb2005 regression becomes
> > > less than 1.5% on 8-core stokley and disappears on 16-core tigerton. I don't know what
> > > causes the last 1.5% regression.
> > > 
> > > As tbench has about 5% improvement and oltp(mysql+sysbench) has 5% improvement, we also tested
> > > to make sure such improvement isn't related to above patch. volanoMark's improvement is also not
> > > related to the patch. So it seems safe to revert it.
> > 
> > No, it's not safe to just revert.  You can replace it with something
> > else, but as long as sched_slice() is called for unqueued tasks, it must
> > emit sane slices, otherwise you can experience a latency-hit-from-hell.
> > 
> > See thread: problem with "sched: revert back to per-rq vruntime"?
> 
> Below patch fixes aim7 regression and specjbb2005 regression becomes
> less than 1.5% on 8-core stokley.
> 
> Jayson,
> Mike's patch fixed the latency problem you reported
> would you please help to test this patch to see if it still works fine now?
> 
> diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
> index 8e1352c..617e54c 100644
> --- a/kernel/sched_fair.c
> +++ b/kernel/sched_fair.c
> @@ -429,10 +429,10 @@ static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)
>  	u64 slice = __sched_period(cfs_rq->nr_running + !se->on_rq);
>  
>  	for_each_sched_entity(se) {
> -		struct load_weight *load = &cfs_rq->load;
> +		struct load_weight *load = &cfs_rq_of(se)->load;
>  
>  		if (unlikely(!se->on_rq)) {
> -			struct load_weight lw = cfs_rq->load;
> +			struct load_weight lw = cfs_rq_of(se)->load;
>  
>  			update_load_add(&lw, se->load.weight);
>  			load = &lw;
> 

Ugh, that's not making sense, the thing is, if !se->on_rq it doesn't yet
have a sensible cfs_rq_of().




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Performance regression of specjbb2005/aim7 with 2.6.29-rc1
  2009-01-15  2:30   ` Lin Ming
  2009-01-15  7:36     ` Peter Zijlstra
@ 2009-01-15 15:10     ` Peter Zijlstra
  2009-01-15 16:17     ` Peter Zijlstra
  2 siblings, 0 replies; 10+ messages in thread
From: Peter Zijlstra @ 2009-01-15 15:10 UTC (permalink / raw
  To: Lin Ming; +Cc: Mike Galbraith, Zhang, Yanmin, dev, LKML

On Thu, 2009-01-15 at 10:30 +0800, Lin Ming wrote:

> diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
> index 8e1352c..617e54c 100644
> --- a/kernel/sched_fair.c
> +++ b/kernel/sched_fair.c
> @@ -429,10 +429,10 @@ static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)
>  	u64 slice = __sched_period(cfs_rq->nr_running + !se->on_rq);
>  
>  	for_each_sched_entity(se) {
> -		struct load_weight *load = &cfs_rq->load;
> +		struct load_weight *load = &cfs_rq_of(se)->load;
>  
>  		if (unlikely(!se->on_rq)) {
> -			struct load_weight lw = cfs_rq->load;
> +			struct load_weight lw = cfs_rq_of(se)->load;
>  
>  			update_load_add(&lw, se->load.weight);
>  			load = &lw;
> 

I was wrong, this does look good.

Thanks


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Performance regression of specjbb2005/aim7 with 2.6.29-rc1
  2009-01-15  2:30   ` Lin Ming
  2009-01-15  7:36     ` Peter Zijlstra
  2009-01-15 15:10     ` Peter Zijlstra
@ 2009-01-15 16:17     ` Peter Zijlstra
  2009-01-15 17:54       ` Ingo Molnar
                         ` (2 more replies)
  2 siblings, 3 replies; 10+ messages in thread
From: Peter Zijlstra @ 2009-01-15 16:17 UTC (permalink / raw
  To: Lin Ming; +Cc: Mike Galbraith, Zhang, Yanmin, dev, LKML

On Thu, 2009-01-15 at 10:30 +0800, Lin Ming wrote:

> Below patch fixes aim7 regression and specjbb2005 regression becomes
> less than 1.5% on 8-core stokley.

Ingo, please apply the below.

Ming, would you also provide a S-o-b line?

---
Subject: sched_slice fixlet
From: Lin Ming <ming.m.lin@intel.com>
Date: Thu Jan 15 17:10:02 CET 2009

Mike's change: 0a582440f -- sched: fix sched_slice())
Broke group scheduling by forgetting to reload cfs_rq on each loop.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
 kernel/sched_fair.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Index: linux-2.6/kernel/sched_fair.c
===================================================================
--- linux-2.6.orig/kernel/sched_fair.c
+++ linux-2.6/kernel/sched_fair.c
@@ -429,7 +429,10 @@ static u64 sched_slice(struct cfs_rq *cf
 	u64 slice = __sched_period(cfs_rq->nr_running + !se->on_rq);
 
 	for_each_sched_entity(se) {
-		struct load_weight *load = &cfs_rq->load;
+		struct load_weight *load;
+
+		cfs_rq = cfs_rq_of(se);
+		load = &cfs_rq->load;
 
 		if (unlikely(!se->on_rq)) {
 			struct load_weight lw = cfs_rq->load;



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Performance regression of specjbb2005/aim7 with 2.6.29-rc1
  2009-01-15 16:17     ` Peter Zijlstra
@ 2009-01-15 17:54       ` Ingo Molnar
  2009-01-15 18:53       ` Jayson King
  2009-01-16  0:49       ` Lin Ming
  2 siblings, 0 replies; 10+ messages in thread
From: Ingo Molnar @ 2009-01-15 17:54 UTC (permalink / raw
  To: Peter Zijlstra; +Cc: Lin Ming, Mike Galbraith, Zhang, Yanmin, dev, LKML


* Peter Zijlstra <peterz@infradead.org> wrote:

> On Thu, 2009-01-15 at 10:30 +0800, Lin Ming wrote:
> 
> > Below patch fixes aim7 regression and specjbb2005 regression becomes
> > less than 1.5% on 8-core stokley.
> 
> Ingo, please apply the below.

Applied to tip/sched/urgent, thanks!

	Ingo

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Performance regression of specjbb2005/aim7 with 2.6.29-rc1
  2009-01-15 16:17     ` Peter Zijlstra
  2009-01-15 17:54       ` Ingo Molnar
@ 2009-01-15 18:53       ` Jayson King
  2009-01-15 20:09         ` Ingo Molnar
  2009-01-16  0:49       ` Lin Ming
  2 siblings, 1 reply; 10+ messages in thread
From: Jayson King @ 2009-01-15 18:53 UTC (permalink / raw
  To: Peter Zijlstra; +Cc: Lin Ming, Mike Galbraith, Zhang, Yanmin, LKML

Peter Zijlstra wrote:
> On Thu, 2009-01-15 at 10:30 +0800, Lin Ming wrote:
> 
>> Below patch fixes aim7 regression and specjbb2005 regression becomes
>> less than 1.5% on 8-core stokley.
> 
> Ingo, please apply the below.
> 
> Ming, would you also provide a S-o-b line?
> 
> ---
> Subject: sched_slice fixlet
> From: Lin Ming <ming.m.lin@intel.com>
> Date: Thu Jan 15 17:10:02 CET 2009
> 
> Mike's change: 0a582440f -- sched: fix sched_slice())
> Broke group scheduling by forgetting to reload cfs_rq on each loop.
> 
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> ---
>  kernel/sched_fair.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> Index: linux-2.6/kernel/sched_fair.c
> ===================================================================
> --- linux-2.6.orig/kernel/sched_fair.c
> +++ linux-2.6/kernel/sched_fair.c
> @@ -429,7 +429,10 @@ static u64 sched_slice(struct cfs_rq *cf
>  	u64 slice = __sched_period(cfs_rq->nr_running + !se->on_rq);
>  
>  	for_each_sched_entity(se) {
> -		struct load_weight *load = &cfs_rq->load;
> +		struct load_weight *load;
> +
> +		cfs_rq = cfs_rq_of(se);
> +		load = &cfs_rq->load;
>  
>  		if (unlikely(!se->on_rq)) {
>  			struct load_weight lw = cfs_rq->load;
> 
> 
> 


That still works for me. You may add:

Tested-by: Jayson King <dev@jaysonking.com>




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Performance regression of specjbb2005/aim7 with 2.6.29-rc1
  2009-01-15 18:53       ` Jayson King
@ 2009-01-15 20:09         ` Ingo Molnar
  0 siblings, 0 replies; 10+ messages in thread
From: Ingo Molnar @ 2009-01-15 20:09 UTC (permalink / raw
  To: Jayson King; +Cc: Peter Zijlstra, Lin Ming, Mike Galbraith, Zhang, Yanmin, LKML


* Jayson King <dev@jaysonking.com> wrote:

>> -		struct load_weight *load = &cfs_rq->load;
>> +		struct load_weight *load;
>> +
>> +		cfs_rq = cfs_rq_of(se);
>> +		load = &cfs_rq->load;
>>   		if (unlikely(!se->on_rq)) {
>>  			struct load_weight lw = cfs_rq->load;
>>
>>
>>
>
>
> That still works for me. You may add:
>
> Tested-by: Jayson King <dev@jaysonking.com>

I have added it to the commit - thanks Jayson for the testing,

	Ingo

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Performance regression of specjbb2005/aim7 with 2.6.29-rc1
  2009-01-15 16:17     ` Peter Zijlstra
  2009-01-15 17:54       ` Ingo Molnar
  2009-01-15 18:53       ` Jayson King
@ 2009-01-16  0:49       ` Lin Ming
  2 siblings, 0 replies; 10+ messages in thread
From: Lin Ming @ 2009-01-16  0:49 UTC (permalink / raw
  To: Peter Zijlstra; +Cc: Mike Galbraith, Zhang, Yanmin, dev@jaysonking.com, LKML

On Fri, 2009-01-16 at 00:17 +0800, Peter Zijlstra wrote:
> On Thu, 2009-01-15 at 10:30 +0800, Lin Ming wrote:
> 
> > Below patch fixes aim7 regression and specjbb2005 regression becomes
> > less than 1.5% on 8-core stokley.
> 
> Ingo, please apply the below.
> 
> Ming, would you also provide a S-o-b line?

Yes,

Signed-off-by: Lin Ming <ming.m.lin@intel.com>

Lin Ming

> 
> ---
> Subject: sched_slice fixlet
> From: Lin Ming <ming.m.lin@intel.com>
> Date: Thu Jan 15 17:10:02 CET 2009
> 
> Mike's change: 0a582440f -- sched: fix sched_slice())
> Broke group scheduling by forgetting to reload cfs_rq on each loop.
> 
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> ---
>  kernel/sched_fair.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> Index: linux-2.6/kernel/sched_fair.c
> ===================================================================
> --- linux-2.6.orig/kernel/sched_fair.c
> +++ linux-2.6/kernel/sched_fair.c
> @@ -429,7 +429,10 @@ static u64 sched_slice(struct cfs_rq *cf
>  	u64 slice = __sched_period(cfs_rq->nr_running + !se->on_rq);
>  
>  	for_each_sched_entity(se) {
> -		struct load_weight *load = &cfs_rq->load;
> +		struct load_weight *load;
> +
> +		cfs_rq = cfs_rq_of(se);
> +		load = &cfs_rq->load;
>  
>  		if (unlikely(!se->on_rq)) {
>  			struct load_weight lw = cfs_rq->load;
> 
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-01-16  0:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-13  8:57 Performance regression of specjbb2005/aim7 with 2.6.29-rc1 Zhang, Yanmin
2009-01-13  9:37 ` Mike Galbraith
2009-01-15  2:30   ` Lin Ming
2009-01-15  7:36     ` Peter Zijlstra
2009-01-15 15:10     ` Peter Zijlstra
2009-01-15 16:17     ` Peter Zijlstra
2009-01-15 17:54       ` Ingo Molnar
2009-01-15 18:53       ` Jayson King
2009-01-15 20:09         ` Ingo Molnar
2009-01-16  0:49       ` Lin Ming

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.