All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>,
	"Zhang, Yanmin" <yanmin_zhang@linux.intel.com>,
	Dhaval Giani <dhaval@linux.vnet.ibm.com>,
	LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Aneesh Kumar KV <aneesh.kumar@linux.vnet.ibm.com>
Subject: Re: volanoMark regression with kernel 2.6.26-rc1
Date: Wed, 14 May 2008 19:14:14 +0530	[thread overview]
Message-ID: <20080514134414.GA12693@linux.vnet.ibm.com> (raw)
In-Reply-To: <1210584047.6524.12.camel@lappy.programming.kicks-ass.net>

On Mon, May 12, 2008 at 11:20:47AM +0200, Peter Zijlstra wrote:
> It looks like things like find_busiest_group() just think everything is
> peachy when the imbalance is < 1 task - which with all this grouping
> stuff is not necessarily true.

fwiw, the following hack seems to help bring down regression to ~5%
(b/n 2.6.25 and 2.6.26-rc1 with USER_SCHED):

Also in the patch GROUP_SCALE can probably be less than what I used (and
needs a ifdef GROUP_SCHED) ..

Not-signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>


---
 kernel/sched.c          |    4 ++++
 kernel/sched_fair.c     |   14 +++++---------
 kernel/sched_features.h |    2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

Index: current/kernel/sched.c
===================================================================
--- current.orig/kernel/sched.c
+++ current/kernel/sched.c
@@ -1551,13 +1551,17 @@ static void cpuacct_charge(struct task_s
 static inline void cpuacct_charge(struct task_struct *tsk, u64 cputime) {}
 #endif
 
+#define GROUP_SCALE	(2*1024)
+
 static inline void inc_cpu_load(struct rq *rq, unsigned long load)
 {
+	load *= GROUP_SCALE;
 	update_load_add(&rq->load, load);
 }
 
 static inline void dec_cpu_load(struct rq *rq, unsigned long load)
 {
+	load *= GROUP_SCALE;
 	update_load_sub(&rq->load, load);
 }
 
Index: current/kernel/sched_fair.c
===================================================================
--- current.orig/kernel/sched_fair.c
+++ current/kernel/sched_fair.c
@@ -1393,24 +1393,20 @@ load_balance_fair(struct rq *this_rq, in
 		unsigned long this_weight, busiest_weight;
 		long rem_load, max_load, moved_load;
 
+		busiest_weight = tg->cfs_rq[busiest_cpu]->task_weight;
 		/*
 		 * empty group
 		 */
-		if (!aggregate(tg, sd)->task_weight)
+		if (!aggregate(tg, sd)->task_weight || !busiest_weight)
 			continue;
 
 		rem_load = rem_load_move * aggregate(tg, sd)->rq_weight;
 		rem_load /= aggregate(tg, sd)->load + 1;
 
-		this_weight = tg->cfs_rq[this_cpu]->task_weight;
-		busiest_weight = tg->cfs_rq[busiest_cpu]->task_weight;
-
-		imbalance = (busiest_weight - this_weight) / 2;
-
-		if (imbalance < 0)
-			imbalance = busiest_weight;
+		if (!rem_load)
+			continue;
 
-		max_load = max(rem_load, imbalance);
+		max_load = rem_load;
 		moved_load = __load_balance_fair(this_rq, this_cpu, busiest,
 				max_load, sd, idle, all_pinned, this_best_prio,
 				tg->cfs_rq[busiest_cpu]);
Index: current/kernel/sched_features.h
===================================================================
--- current.orig/kernel/sched_features.h
+++ current/kernel/sched_features.h
@@ -6,5 +6,5 @@ SCHED_FEAT(CACHE_HOT_BUDDY, 1)
 SCHED_FEAT(SYNC_WAKEUPS, 1)
 SCHED_FEAT(HRTICK, 1)
 SCHED_FEAT(DOUBLE_TICK, 0)
-SCHED_FEAT(NORMALIZED_SLEEPER, 1)
+SCHED_FEAT(NORMALIZED_SLEEPER, 0)
 SCHED_FEAT(DEADLINE, 1)

-- 
Regards,
vatsa

  parent reply	other threads:[~2008-05-14 13:35 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-06  2:06 volanoMark regression with kernel 2.6.26-rc1 Zhang, Yanmin
2008-05-06  5:41 ` Zhang, Yanmin
2008-05-06 11:52 ` Dhaval Giani
2008-05-07 17:33   ` Dhaval Giani
2008-05-08  5:18     ` Zhang, Yanmin
2008-05-08  5:32       ` Dhaval Giani
2008-05-08  5:40       ` Dhaval Giani
2008-05-08  5:53         ` Zhang, Yanmin
2008-05-08  6:04           ` Dhaval Giani
2008-05-08  6:11           ` Srivatsa Vaddagiri
2008-05-09 15:52             ` Srivatsa Vaddagiri
2008-05-09 15:54               ` Srivatsa Vaddagiri
2008-05-12  1:39               ` Zhang, Yanmin
2008-05-12  2:04                 ` Dhaval Giani
2008-05-12  2:37                 ` Srivatsa Vaddagiri
2008-05-12  3:33                   ` Zhang, Yanmin
2008-05-12  4:52                     ` Srivatsa Vaddagiri
2008-05-12  5:02                       ` Zhang, Yanmin
2008-05-12  5:43                         ` Zhang, Yanmin
2008-05-12  9:04                         ` Mike Galbraith
2008-05-12  9:20                           ` Peter Zijlstra
2008-05-14  9:22                             ` Zhang, Yanmin
2008-05-14 13:44                             ` Srivatsa Vaddagiri [this message]
2008-05-14 14:50                               ` Mike Galbraith
2008-05-14 15:12                               ` Peter Zijlstra
2008-05-15  8:20                                 ` Srivatsa Vaddagiri
2008-05-15  8:41                                   ` Peter Zijlstra
2008-05-15 17:10                                     ` Srivatsa Vaddagiri
2008-05-07  7:04 ` Andrew Morton
2008-05-07  9:17 ` Ingo Molnar
2008-05-07  9:33   ` Zhang, Yanmin
2008-05-07 17:34   ` Peter Zijlstra
2008-05-07 18:58     ` Peter Zijlstra
2008-05-08  6:07       ` Zhang, Yanmin
2008-05-08  5:20     ` Zhang, Yanmin
2008-05-08  5:34       ` Dhaval Giani
2008-05-08  6:43       ` Peter Zijlstra
2008-05-07 17:42 ` Dhaval Giani
2008-05-08  5:21   ` Zhang, Yanmin
2008-05-08  5:39     ` Dhaval Giani
2008-05-08  6:03       ` Zhang, Yanmin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080514134414.GA12693@linux.vnet.ibm.com \
    --to=vatsa@linux.vnet.ibm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=dhaval@linux.vnet.ibm.com \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=yanmin_zhang@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.