Re: [patch 11/12] sched: remove ASYM_GRAN feature

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mike Galbraith
Date: Thursday, March 11, 2010 - 3:01 am

sched: remove ASYM_GRAN feature

This features has been enabled for quite a while, after testing showed that
easing preemption for light tasks was harmful to high priority threads.

Remove it.

Signed-off-by: Mike Galbraith <efault@gmx.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>

---
 kernel/sched_fair.c     |   28 +++++++++++-----------------
 kernel/sched_features.h |    6 ------
 2 files changed, 11 insertions(+), 23 deletions(-)

Index: linux-2.6/kernel/sched_fair.c
===================================================================
--- linux-2.6.orig/kernel/sched_fair.c
+++ linux-2.6/kernel/sched_fair.c
@@ -1582,24 +1582,18 @@ wakeup_gran(struct sched_entity *curr, s
 	/*
 	 * Since its curr running now, convert the gran from real-time
 	 * to virtual-time in his units.
+	 *
+	 * By using 'se' instead of 'curr' we penalize light tasks, so
+	 * they get preempted easier. That is, if 'se' < 'curr' then
+	 * the resulting gran will be larger, therefore penalizing the
+	 * lighter, if otoh 'se' > 'curr' then the resulting gran will
+	 * be smaller, again penalizing the lighter task.
+	 *
+	 * This is especially important for buddies when the leftmost
+	 * task is higher priority than the buddy.
 	 */
-	if (sched_feat(ASYM_GRAN)) {
-		/*
-		 * By using 'se' instead of 'curr' we penalize light tasks, so
-		 * they get preempted easier. That is, if 'se' < 'curr' then
-		 * the resulting gran will be larger, therefore penalizing the
-		 * lighter, if otoh 'se' > 'curr' then the resulting gran will
-		 * be smaller, again penalizing the lighter task.
-		 *
-		 * This is especially important for buddies when the leftmost
-		 * task is higher priority than the buddy.
-		 */
-		if (unlikely(se->load.weight != NICE_0_LOAD))
-			gran = calc_delta_fair(gran, se);
-	} else {
-		if (unlikely(curr->load.weight != NICE_0_LOAD))
-			gran = calc_delta_fair(gran, curr);
-	}
+	if (unlikely(se->load.weight != NICE_0_LOAD))
+		gran = calc_delta_fair(gran, se);
 
 	return gran;
 }
Index: linux-2.6/kernel/sched_features.h
===================================================================
--- linux-2.6.orig/kernel/sched_features.h
+++ linux-2.6/kernel/sched_features.h
@@ -17,12 +17,6 @@ SCHED_FEAT(START_DEBIT, 1)
 SCHED_FEAT(WAKEUP_PREEMPT, 1)
 
 /*
- * When converting the wakeup granularity to virtual time, do it such
- * that heavier tasks preempting a lighter task have an edge.
- */
-SCHED_FEAT(ASYM_GRAN, 1)
-
-/*
  * Use the SYNC wakeup hint, pipes and the likes use this to indicate
  * the remote end is likely to consume the data we just wrote, and
  * therefore has cache benefit from being placed on the same cpu, see


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 0/12] sched: fastpath cycle recovery, Mike Galbraith, (Thu Mar 11, 2:49 am)
Re: [patch 1/12] sched: ratelimit nohz, Mike Galbraith, (Thu Mar 11, 2:50 am)
Re: [patch 2/12] sched: remove avg_wakeup, Mike Galbraith, (Thu Mar 11, 2:51 am)
Re: [patch 3/12] sched: remove avg_overlap, Mike Galbraith, (Thu Mar 11, 2:52 am)
Re: [patch 4/12] sched: cleanup/optimize clock updates, Mike Galbraith, (Thu Mar 11, 2:53 am)
Re: [patch 6/12] sched: fix select_idle_sibling(), Mike Galbraith, (Thu Mar 11, 2:56 am)
Re: [patch 7/12] sched: remove NORMALIZED_SLEEPER, Mike Galbraith, (Thu Mar 11, 2:57 am)
Re: [patch 8/12] sched: remove FAIR_SLEEPERS feature, Mike Galbraith, (Thu Mar 11, 2:58 am)
Re: [patch 9/12] sched: remove WAKEUP_SYNC feature, Mike Galbraith, (Thu Mar 11, 2:59 am)
Re: [patch 11/12] sched: remove ASYM_GRAN feature, Mike Galbraith, (Thu Mar 11, 3:01 am)
Re: [patch 10/12] sched: remove SYNC_WAKEUPS feature, Mike Galbraith, (Thu Mar 11, 3:03 am)
Re: [patch 12/12] sched: remove AFFINE_WAKEUPS feature, Mike Galbraith, (Thu Mar 11, 3:04 am)
[tip:sched/core] sched: Rate-limit nohz, tip-bot for Mike Gal ..., (Thu Mar 11, 11:30 am)
[tip:sched/core] sched: Remove avg_wakeup, tip-bot for Mike Gal ..., (Thu Mar 11, 11:30 am)
[tip:sched/core] sched: Remove avg_overlap, tip-bot for Mike Gal ..., (Thu Mar 11, 11:31 am)
[tip:sched/core] sched: Cleanup/optimize clock updates, tip-bot for Mike Gal ..., (Thu Mar 11, 11:31 am)
[tip:sched/core] sched: Tweak sched_latency and min_granul ..., tip-bot for Mike Gal ..., (Thu Mar 11, 11:31 am)
[tip:sched/core] sched: Fix select_idle_sibling(), tip-bot for Mike Gal ..., (Thu Mar 11, 11:32 am)
[tip:sched/core] sched: Remove NORMALIZED_SLEEPER, tip-bot for Mike Gal ..., (Thu Mar 11, 11:32 am)
[tip:sched/core] sched: Remove FAIR_SLEEPERS feature, tip-bot for Mike Gal ..., (Thu Mar 11, 11:32 am)
[tip:sched/core] sched: Remove WAKEUP_SYNC feature, tip-bot for Mike Gal ..., (Thu Mar 11, 11:32 am)
[tip:sched/core] sched: Remove SYNC_WAKEUPS feature, tip-bot for Mike Gal ..., (Thu Mar 11, 11:33 am)
[tip:sched/core] sched: Remove ASYM_GRAN feature, tip-bot for Mike Gal ..., (Thu Mar 11, 11:33 am)
[tip:sched/core] sched: Remove AFFINE_WAKEUPS feature, tip-bot for Mike Gal ..., (Thu Mar 11, 11:33 am)
Re: [tip:sched/core] sched: Remove AFFINE_WAKEUPS feature, Mike Galbraith, (Thu Mar 11, 9:37 pm)