linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sched:make ads.avg_load update in time
@ 2011-04-15  2:11 Alex Shi
       [not found] ` <ACA3447D-4BC5-45A1-B2C4-47A53F6094F7@parallels.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Shi @ 2011-04-15  2:11 UTC (permalink / raw)
  To: a.p.zijlstra, linux-kernel; +Cc: tim.c.chen, suresh.b.siddha

commit 866ab43efd325fae cause hackbench benchmark process mode
performance dropping about 15% on our x86_64 machines. The patch works
as its origin purpose, but it cause nearly double context switch on
hackbench running.  The sds.avg_load was not updated in time cause this.
So when move the sds.avg_load update before group_imb checking,
performance recovered totally.

Signed-off-by: Alex Shi <alex.shi@intel.com>
---
 kernel/sched_fair.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 7f00772..036b660 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -3127,6 +3127,8 @@ find_busiest_group(struct sched_domain *sd, int this_cpu,
 	if (!sds.busiest || sds.busiest_nr_running == 0)
 		goto out_balanced;
 
+	sds->avg_load = (SCHED_LOAD_SCALE * sds->total_load) / sds->total_pwr;
+
 	/*
 	 * If the busiest group is imbalanced the below checks don't
 	 * work because they assumes all things are equal, which typically
@@ -3151,7 +3153,6 @@ find_busiest_group(struct sched_domain *sd, int this_cpu,
 	 * Don't pull any tasks if this group is already above the domain
 	 * average load.
 	 */
-	sds.avg_load = (SCHED_LOAD_SCALE * sds.total_load) / sds.total_pwr;
 	if (sds.this_load >= sds.avg_load)
 		goto out_balanced;
 
-- 
1.7.0


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

* Re: [PATCH] sched:make ads.avg_load update in time
       [not found] ` <ACA3447D-4BC5-45A1-B2C4-47A53F6094F7@parallels.com>
@ 2011-04-15  6:24   ` Alex,Shi
  0 siblings, 0 replies; 2+ messages in thread
From: Alex,Shi @ 2011-04-15  6:24 UTC (permalink / raw)
  To: Vladimir Davydov
  Cc: a.p.zijlstra@chello.nl, linux-kernel@vger.kernel.org, Chen, Tim C,
	Siddha, Suresh B


On Fri, 2011-04-15 at 14:13 +0800, Vladimir Davydov wrote:
> http://git.kernel.org/tip/b0432d8f162c7d5d9537b4cb749d44076b76a783
> 

oops, did not see it in time. forget my patch. sorry! 



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

end of thread, other threads:[~2011-04-15  6:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-15  2:11 [PATCH] sched:make ads.avg_load update in time Alex Shi
     [not found] ` <ACA3447D-4BC5-45A1-B2C4-47A53F6094F7@parallels.com>
2011-04-15  6:24   ` Alex,Shi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).