diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-11-15 11:14:39 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-11-17 06:20:22 -0500 |
commit | 391e43da797a96aeb65410281891f6d0b0e9611c (patch) | |
tree | 0ce6784525a5a8f75b377170cf1a7d60abccea29 /kernel | |
parent | 029632fbb7b7c9d85063cc9eb470de6c54873df3 (diff) |
sched: Move all scheduler bits into kernel/sched/
There's too many sched*.[ch] files in kernel/, give them their own
directory.
(No code changed, other than Makefile glue added.)
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/Makefile | 20 | ||||
-rw-r--r-- | kernel/sched/Makefile | 20 | ||||
-rw-r--r-- | kernel/sched/auto_group.c (renamed from kernel/sched_autogroup.c) | 0 | ||||
-rw-r--r-- | kernel/sched/auto_group.h (renamed from kernel/sched_autogroup.h) | 0 | ||||
-rw-r--r-- | kernel/sched/clock.c (renamed from kernel/sched_clock.c) | 0 | ||||
-rw-r--r-- | kernel/sched/core.c (renamed from kernel/sched.c) | 8 | ||||
-rw-r--r-- | kernel/sched/cpupri.c (renamed from kernel/sched_cpupri.c) | 4 | ||||
-rw-r--r-- | kernel/sched/cpupri.h (renamed from kernel/sched_cpupri.h) | 0 | ||||
-rw-r--r-- | kernel/sched/debug.c (renamed from kernel/sched_debug.c) | 2 | ||||
-rw-r--r-- | kernel/sched/fair.c (renamed from kernel/sched_fair.c) | 0 | ||||
-rw-r--r-- | kernel/sched/features.h (renamed from kernel/sched_features.h) | 0 | ||||
-rw-r--r-- | kernel/sched/idle_task.c (renamed from kernel/sched_idletask.c) | 0 | ||||
-rw-r--r-- | kernel/sched/rt.c (renamed from kernel/sched_rt.c) | 0 | ||||
-rw-r--r-- | kernel/sched/sched.h (renamed from kernel/sched.h) | 8 | ||||
-rw-r--r-- | kernel/sched/stats.c (renamed from kernel/sched_stats.c) | 0 | ||||
-rw-r--r-- | kernel/sched/stats.h (renamed from kernel/sched_stats.h) | 0 | ||||
-rw-r--r-- | kernel/sched/stop_task.c (renamed from kernel/sched_stoptask.c) | 0 |
17 files changed, 34 insertions, 28 deletions
diff --git a/kernel/Makefile b/kernel/Makefile index 1a4d37d7f39a..f70396e5a24b 100644 --- a/kernel/Makefile +++ b/kernel/Makefile | |||
@@ -9,14 +9,9 @@ obj-y = fork.o exec_domain.o panic.o printk.o \ | |||
9 | rcupdate.o extable.o params.o posix-timers.o \ | 9 | rcupdate.o extable.o params.o posix-timers.o \ |
10 | kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \ | 10 | kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \ |
11 | hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \ | 11 | hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \ |
12 | notifier.o ksysfs.o sched_clock.o cred.o \ | 12 | notifier.o ksysfs.o cred.o \ |
13 | async.o range.o groups.o | 13 | async.o range.o groups.o |
14 | 14 | ||
15 | obj-y += sched.o sched_idletask.o sched_fair.o sched_rt.o sched_stoptask.o | ||
16 | obj-$(CONFIG_SCHED_AUTOGROUP) += sched_autogroup.o | ||
17 | obj-$(CONFIG_SCHEDSTATS) += sched_stats.o | ||
18 | obj-$(CONFIG_SCHED_DEBUG) += sched_debug.o | ||
19 | |||
20 | ifdef CONFIG_FUNCTION_TRACER | 15 | ifdef CONFIG_FUNCTION_TRACER |
21 | # Do not trace debug files and internal ftrace files | 16 | # Do not trace debug files and internal ftrace files |
22 | CFLAGS_REMOVE_lockdep.o = -pg | 17 | CFLAGS_REMOVE_lockdep.o = -pg |
@@ -24,10 +19,11 @@ CFLAGS_REMOVE_lockdep_proc.o = -pg | |||
24 | CFLAGS_REMOVE_mutex-debug.o = -pg | 19 | CFLAGS_REMOVE_mutex-debug.o = -pg |
25 | CFLAGS_REMOVE_rtmutex-debug.o = -pg | 20 | CFLAGS_REMOVE_rtmutex-debug.o = -pg |
26 | CFLAGS_REMOVE_cgroup-debug.o = -pg | 21 | CFLAGS_REMOVE_cgroup-debug.o = -pg |
27 | CFLAGS_REMOVE_sched_clock.o = -pg | ||
28 | CFLAGS_REMOVE_irq_work.o = -pg | 22 | CFLAGS_REMOVE_irq_work.o = -pg |
29 | endif | 23 | endif |
30 | 24 | ||
25 | obj-y += sched/ | ||
26 | |||
31 | obj-$(CONFIG_FREEZER) += freezer.o | 27 | obj-$(CONFIG_FREEZER) += freezer.o |
32 | obj-$(CONFIG_PROFILING) += profile.o | 28 | obj-$(CONFIG_PROFILING) += profile.o |
33 | obj-$(CONFIG_SYSCTL_SYSCALL_CHECK) += sysctl_check.o | 29 | obj-$(CONFIG_SYSCTL_SYSCALL_CHECK) += sysctl_check.o |
@@ -103,7 +99,6 @@ obj-$(CONFIG_TRACING) += trace/ | |||
103 | obj-$(CONFIG_X86_DS) += trace/ | 99 | obj-$(CONFIG_X86_DS) += trace/ |
104 | obj-$(CONFIG_RING_BUFFER) += trace/ | 100 | obj-$(CONFIG_RING_BUFFER) += trace/ |
105 | obj-$(CONFIG_TRACEPOINTS) += trace/ | 101 | obj-$(CONFIG_TRACEPOINTS) += trace/ |
106 | obj-$(CONFIG_SMP) += sched_cpupri.o | ||
107 | obj-$(CONFIG_IRQ_WORK) += irq_work.o | 102 | obj-$(CONFIG_IRQ_WORK) += irq_work.o |
108 | obj-$(CONFIG_CPU_PM) += cpu_pm.o | 103 | obj-$(CONFIG_CPU_PM) += cpu_pm.o |
109 | 104 | ||
@@ -114,15 +109,6 @@ obj-$(CONFIG_PADATA) += padata.o | |||
114 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o | 109 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o |
115 | obj-$(CONFIG_JUMP_LABEL) += jump_label.o | 110 | obj-$(CONFIG_JUMP_LABEL) += jump_label.o |
116 | 111 | ||
117 | ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y) | ||
118 | # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is | ||
119 | # needed for x86 only. Why this used to be enabled for all architectures is beyond | ||
120 | # me. I suspect most platforms don't need this, but until we know that for sure | ||
121 | # I turn this off for IA-64 only. Andreas Schwab says it's also needed on m68k | ||
122 | # to get a correct value for the wait-channel (WCHAN in ps). --davidm | ||
123 | CFLAGS_sched.o := $(PROFILING) -fno-omit-frame-pointer | ||
124 | endif | ||
125 | |||
126 | $(obj)/configs.o: $(obj)/config_data.h | 112 | $(obj)/configs.o: $(obj)/config_data.h |
127 | 113 | ||
128 | # config_data.h contains the same information as ikconfig.h but gzipped. | 114 | # config_data.h contains the same information as ikconfig.h but gzipped. |
diff --git a/kernel/sched/Makefile b/kernel/sched/Makefile new file mode 100644 index 000000000000..9a7dd35102a3 --- /dev/null +++ b/kernel/sched/Makefile | |||
@@ -0,0 +1,20 @@ | |||
1 | ifdef CONFIG_FUNCTION_TRACER | ||
2 | CFLAGS_REMOVE_clock.o = -pg | ||
3 | endif | ||
4 | |||
5 | ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y) | ||
6 | # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is | ||
7 | # needed for x86 only. Why this used to be enabled for all architectures is beyond | ||
8 | # me. I suspect most platforms don't need this, but until we know that for sure | ||
9 | # I turn this off for IA-64 only. Andreas Schwab says it's also needed on m68k | ||
10 | # to get a correct value for the wait-channel (WCHAN in ps). --davidm | ||
11 | CFLAGS_core.o := $(PROFILING) -fno-omit-frame-pointer | ||
12 | endif | ||
13 | |||
14 | obj-y += core.o clock.o idle_task.o fair.o rt.o stop_task.o | ||
15 | obj-$(CONFIG_SMP) += cpupri.o | ||
16 | obj-$(CONFIG_SCHED_AUTOGROUP) += auto_group.o | ||
17 | obj-$(CONFIG_SCHEDSTATS) += stats.o | ||
18 | obj-$(CONFIG_SCHED_DEBUG) += debug.o | ||
19 | |||
20 | |||
diff --git a/kernel/sched_autogroup.c b/kernel/sched/auto_group.c index e8a1f83ee0e7..e8a1f83ee0e7 100644 --- a/kernel/sched_autogroup.c +++ b/kernel/sched/auto_group.c | |||
diff --git a/kernel/sched_autogroup.h b/kernel/sched/auto_group.h index 8bd047142816..8bd047142816 100644 --- a/kernel/sched_autogroup.h +++ b/kernel/sched/auto_group.h | |||
diff --git a/kernel/sched_clock.c b/kernel/sched/clock.c index c685e31492df..c685e31492df 100644 --- a/kernel/sched_clock.c +++ b/kernel/sched/clock.c | |||
diff --git a/kernel/sched.c b/kernel/sched/core.c index 2ffcceed8862..ca8fd44145ac 100644 --- a/kernel/sched.c +++ b/kernel/sched/core.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * kernel/sched.c | 2 | * kernel/sched/core.c |
3 | * | 3 | * |
4 | * Kernel scheduler and related syscalls | 4 | * Kernel scheduler and related syscalls |
5 | * | 5 | * |
@@ -79,7 +79,7 @@ | |||
79 | #endif | 79 | #endif |
80 | 80 | ||
81 | #include "sched.h" | 81 | #include "sched.h" |
82 | #include "workqueue_sched.h" | 82 | #include "../workqueue_sched.h" |
83 | 83 | ||
84 | #define CREATE_TRACE_POINTS | 84 | #define CREATE_TRACE_POINTS |
85 | #include <trace/events/sched.h> | 85 | #include <trace/events/sched.h> |
@@ -129,7 +129,7 @@ void update_rq_clock(struct rq *rq) | |||
129 | (1UL << __SCHED_FEAT_##name) * enabled | | 129 | (1UL << __SCHED_FEAT_##name) * enabled | |
130 | 130 | ||
131 | const_debug unsigned int sysctl_sched_features = | 131 | const_debug unsigned int sysctl_sched_features = |
132 | #include "sched_features.h" | 132 | #include "features.h" |
133 | 0; | 133 | 0; |
134 | 134 | ||
135 | #undef SCHED_FEAT | 135 | #undef SCHED_FEAT |
@@ -139,7 +139,7 @@ const_debug unsigned int sysctl_sched_features = | |||
139 | #name , | 139 | #name , |
140 | 140 | ||
141 | static __read_mostly char *sched_feat_names[] = { | 141 | static __read_mostly char *sched_feat_names[] = { |
142 | #include "sched_features.h" | 142 | #include "features.h" |
143 | NULL | 143 | NULL |
144 | }; | 144 | }; |
145 | 145 | ||
diff --git a/kernel/sched_cpupri.c b/kernel/sched/cpupri.c index a86cf9d9eb11..b0d798eaf130 100644 --- a/kernel/sched_cpupri.c +++ b/kernel/sched/cpupri.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * kernel/sched_cpupri.c | 2 | * kernel/sched/cpupri.c |
3 | * | 3 | * |
4 | * CPU priority management | 4 | * CPU priority management |
5 | * | 5 | * |
@@ -28,7 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/gfp.h> | 30 | #include <linux/gfp.h> |
31 | #include "sched_cpupri.h" | 31 | #include "cpupri.h" |
32 | 32 | ||
33 | /* Convert between a 140 based task->prio, and our 102 based cpupri */ | 33 | /* Convert between a 140 based task->prio, and our 102 based cpupri */ |
34 | static int convert_prio(int prio) | 34 | static int convert_prio(int prio) |
diff --git a/kernel/sched_cpupri.h b/kernel/sched/cpupri.h index f6d756173491..f6d756173491 100644 --- a/kernel/sched_cpupri.h +++ b/kernel/sched/cpupri.h | |||
diff --git a/kernel/sched_debug.c b/kernel/sched/debug.c index ce1a85f2ddcb..2a075e10004b 100644 --- a/kernel/sched_debug.c +++ b/kernel/sched/debug.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * kernel/time/sched_debug.c | 2 | * kernel/sched/debug.c |
3 | * | 3 | * |
4 | * Print the CFS rbtree | 4 | * Print the CFS rbtree |
5 | * | 5 | * |
diff --git a/kernel/sched_fair.c b/kernel/sched/fair.c index cd3b64219d9f..cd3b64219d9f 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched/fair.c | |||
diff --git a/kernel/sched_features.h b/kernel/sched/features.h index 84802245abd2..84802245abd2 100644 --- a/kernel/sched_features.h +++ b/kernel/sched/features.h | |||
diff --git a/kernel/sched_idletask.c b/kernel/sched/idle_task.c index 91b4c957f289..91b4c957f289 100644 --- a/kernel/sched_idletask.c +++ b/kernel/sched/idle_task.c | |||
diff --git a/kernel/sched_rt.c b/kernel/sched/rt.c index 023b35502509..023b35502509 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched/rt.c | |||
diff --git a/kernel/sched.h b/kernel/sched/sched.h index 675261ce3c4a..c2e780234c31 100644 --- a/kernel/sched.h +++ b/kernel/sched/sched.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #include <linux/spinlock.h> | 4 | #include <linux/spinlock.h> |
5 | #include <linux/stop_machine.h> | 5 | #include <linux/stop_machine.h> |
6 | 6 | ||
7 | #include "sched_cpupri.h" | 7 | #include "cpupri.h" |
8 | 8 | ||
9 | extern __read_mostly int scheduler_running; | 9 | extern __read_mostly int scheduler_running; |
10 | 10 | ||
@@ -507,8 +507,8 @@ DECLARE_PER_CPU(struct rq, runqueues); | |||
507 | #define cpu_curr(cpu) (cpu_rq(cpu)->curr) | 507 | #define cpu_curr(cpu) (cpu_rq(cpu)->curr) |
508 | #define raw_rq() (&__raw_get_cpu_var(runqueues)) | 508 | #define raw_rq() (&__raw_get_cpu_var(runqueues)) |
509 | 509 | ||
510 | #include "sched_stats.h" | 510 | #include "stats.h" |
511 | #include "sched_autogroup.h" | 511 | #include "auto_group.h" |
512 | 512 | ||
513 | #ifdef CONFIG_CGROUP_SCHED | 513 | #ifdef CONFIG_CGROUP_SCHED |
514 | 514 | ||
@@ -590,7 +590,7 @@ extern const_debug unsigned int sysctl_sched_features; | |||
590 | __SCHED_FEAT_##name , | 590 | __SCHED_FEAT_##name , |
591 | 591 | ||
592 | enum { | 592 | enum { |
593 | #include "sched_features.h" | 593 | #include "features.h" |
594 | }; | 594 | }; |
595 | 595 | ||
596 | #undef SCHED_FEAT | 596 | #undef SCHED_FEAT |
diff --git a/kernel/sched_stats.c b/kernel/sched/stats.c index 2a581ba8e190..2a581ba8e190 100644 --- a/kernel/sched_stats.c +++ b/kernel/sched/stats.c | |||
diff --git a/kernel/sched_stats.h b/kernel/sched/stats.h index ea2b6f0ec868..ea2b6f0ec868 100644 --- a/kernel/sched_stats.h +++ b/kernel/sched/stats.h | |||
diff --git a/kernel/sched_stoptask.c b/kernel/sched/stop_task.c index 7b386e86fd23..7b386e86fd23 100644 --- a/kernel/sched_stoptask.c +++ b/kernel/sched/stop_task.c | |||