mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] make sched_{fair,rt}.c ifdefs more readable
@ 2008-06-26 13:36 Dhaval Giani
  0 siblings, 0 replies; only message in thread
From: Dhaval Giani @ 2008-06-26 13:36 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra; +Cc: Thomas Gleixner, Srivatsa Vaddagiri, lkml

Hi Ingo,

Another patch to make the ifdef jungle more readable :)

Thanks,


sched: Make sched_{rt,fair}.c ifdefs more readable


Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>

Index: linux-2.6-tip/kernel/sched_rt.c
===================================================================
--- linux-2.6-tip.orig/kernel/sched_rt.c	2008-06-23 21:52:33.000000000 +0530
+++ linux-2.6-tip/kernel/sched_rt.c	2008-06-24 22:48:34.000000000 +0530
@@ -161,7 +161,7 @@ static inline struct rt_bandwidth *sched
 	return &rt_rq->tg->rt_bandwidth;
 }
 
-#else
+#else /* !CONFIG_RT_GROUP_SCHED */
 
 static inline u64 sched_rt_runtime(struct rt_rq *rt_rq)
 {
@@ -226,7 +226,7 @@ static inline struct rt_bandwidth *sched
 	return &def_rt_bandwidth;
 }
 
-#endif
+#endif /* CONFIG_RT_GROUP_SCHED */
 
 #ifdef CONFIG_SMP
 static int do_balance_runtime(struct rt_rq *rt_rq)
@@ -375,12 +375,12 @@ static int balance_runtime(struct rt_rq 
 
 	return more;
 }
-#else
+#else /* !CONFIG_SMP */
 static inline int balance_runtime(struct rt_rq *rt_rq)
 {
 	return 0;
 }
-#endif
+#endif /* CONFIG_SMP */
 
 static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun)
 {
@@ -1470,4 +1470,4 @@ static void print_rt_stats(struct seq_fi
 		print_rt_rq(m, cpu, rt_rq);
 	rcu_read_unlock();
 }
-#endif
+#endif /* CONFIG_SCHED_DEBUG */
Index: linux-2.6-tip/kernel/sched_fair.c
===================================================================
--- linux-2.6-tip.orig/kernel/sched_fair.c	2008-06-23 21:52:33.000000000 +0530
+++ linux-2.6-tip/kernel/sched_fair.c	2008-06-24 22:55:07.000000000 +0530
@@ -832,7 +832,7 @@ static void hrtick_start_fair(struct rq 
 		hrtick_start(rq, delta, requeue);
 	}
 }
-#else
+#else /* !CONFIG_SCHED_HRTICK */
 static inline void
 hrtick_start_fair(struct rq *rq, struct task_struct *p)
 {
@@ -973,7 +973,7 @@ static int wake_idle(int cpu, struct tas
 	}
 	return cpu;
 }
-#else
+#else /* !ARCH_HAS_SCHED_WAKE_IDLE*/
 static inline int wake_idle(int cpu, struct task_struct *p)
 {
 	return cpu;
@@ -1318,7 +1318,7 @@ static int cfs_rq_best_prio(struct cfs_r
 
 	return p->prio;
 }
-#endif
+#endif /* CONFIG_FAIR_GROUP_SCHED */
 
 static unsigned long
 load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest,
@@ -1351,7 +1351,7 @@ load_balance_fair(struct rq *this_rq, in
 		maxload = min(rem_load_move, imbalance);
 
 		*this_best_prio = cfs_rq_best_prio(this_cfs_rq);
-#else
+#else /* !CONFIG_FAIR_GROUP_SCHED */
 # define maxload rem_load_move
 #endif
 		/*
@@ -1394,7 +1394,7 @@ move_one_task_fair(struct rq *this_rq, i
 
 	return 0;
 }
-#endif
+#endif /* CONFIG_SMP */
 
 /*
  * scheduler tick hitting a task of our scheduling class:
-- 
regards,
Dhaval

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-26 13:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-26 13:36 [PATCH] make sched_{fair,rt}.c ifdefs more readable Dhaval Giani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®