All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Tidy up left over smpnice code after changes introduced with CFS
@ 2007-08-02  6:33 Peter Williams
  2007-08-02 10:29 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Williams @ 2007-08-02  6:33 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 799 bytes --]

1. The only place that RTPRIO_TO_LOAD_WEIGHT() is used is in the call to 
move_tasks() in the function active_load_balance() and its purpose here 
is just to make sure that the load to be moved is big enough to ensure 
that exactly one task is moved (if there's one available).  This can be 
accomplished by using ULONG_MAX instead and this allows 
RTPRIO_TO_LOAD_WEIGHT() to be deleted.

2. This, in turn, allows PRIO_TO_LOAD_WEIGHT() to be deleted.

3. This allows load_weight() to be deleted which allows 
TIME_SLICE_NICE_ZERO to be deleted along with the comment above it.

Signed-off-by: Peter Williams <pwil3058@bigpond.net.au>

-- 
Peter Williams                                   pwil3058@bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
  -- Ambrose Bierce

[-- Attachment #2: tidy-up-smpnice-code-after-cfs-changes.patch --]
[-- Type: text/x-patch, Size: 1129 bytes --]

diff -r 622a128d084b kernel/sched.c
--- a/kernel/sched.c	Mon Jul 30 21:54:37 2007 -0700
+++ b/kernel/sched.c	Thu Aug 02 16:21:19 2007 +1000
@@ -727,19 +727,6 @@ static void update_curr_load(struct rq *
  * slice expiry etc.
  */
 
-/*
- * Assume: static_prio_timeslice(NICE_TO_PRIO(0)) == DEF_TIMESLICE
- * If static_prio_timeslice() is ever changed to break this assumption then
- * this code will need modification
- */
-#define TIME_SLICE_NICE_ZERO DEF_TIMESLICE
-#define load_weight(lp) \
-	(((lp) * SCHED_LOAD_SCALE) / TIME_SLICE_NICE_ZERO)
-#define PRIO_TO_LOAD_WEIGHT(prio) \
-	load_weight(static_prio_timeslice(prio))
-#define RTPRIO_TO_LOAD_WEIGHT(rp) \
-	(PRIO_TO_LOAD_WEIGHT(MAX_RT_PRIO) + load_weight(rp))
-
 #define WEIGHT_IDLEPRIO		2
 #define WMULT_IDLEPRIO		(1 << 31)
 
@@ -2906,8 +2893,7 @@ static void active_load_balance(struct r
 		schedstat_inc(sd, alb_cnt);
 
 		if (move_tasks(target_rq, target_cpu, busiest_rq, 1,
-			       RTPRIO_TO_LOAD_WEIGHT(100), sd, CPU_IDLE,
-			       NULL))
+			       ULONG_MAX, sd, CPU_IDLE, NULL))
 			schedstat_inc(sd, alb_pushed);
 		else
 			schedstat_inc(sd, alb_failed);

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

end of thread, other threads:[~2007-08-02 10:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-02  6:33 [PATCH] Tidy up left over smpnice code after changes introduced with CFS Peter Williams
2007-08-02 10:29 ` Ingo Molnar

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.