sched: mark scheduling classes as const
mark scheduling classes as const. The speeds up the code
a bit and shrinks it:
text data bss dec hex filename
40027 4018 292 44337 ad31 sched.o.before
40190 3842 292 44324 ad24 sched.o.after
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index de13a6f..32fd976 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -76,8 +76,6 @@
*/
const_debug unsigned int sysctl_sched_wakeup_granularity = 2000000UL;
-extern struct sched_class fair_sched_class;
-
/**************************************************************
* CFS operations on generic schedulable entities:
*/
@@ -1031,7 +1029,8 @@
/*
* All the scheduling class methods:
*/
-struct sched_class fair_sched_class __read_mostly = {
+static const struct sched_class fair_sched_class = {
+ .next = &idle_sched_class,
.enqueue_task = enqueue_task_fair,
.dequeue_task = dequeue_task_fair,
.yield_task = yield_task_fair,