Skip to content

Commit

Permalink
sched: Move all scheduler bits into kernel/sched/
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Nov 17, 2011
1 parent 029632f commit 391e43d
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 28 deletions.
20 changes: 3 additions & 17 deletions kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,21 @@ obj-y = fork.o exec_domain.o panic.o printk.o \
rcupdate.o extable.o params.o posix-timers.o \
kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \
hrtimer.o rwsem.o nsproxy.o srcu.o semaphore.o \
notifier.o ksysfs.o sched_clock.o cred.o \
notifier.o ksysfs.o cred.o \
async.o range.o groups.o

obj-y += sched.o sched_idletask.o sched_fair.o sched_rt.o sched_stoptask.o
obj-$(CONFIG_SCHED_AUTOGROUP) += sched_autogroup.o
obj-$(CONFIG_SCHEDSTATS) += sched_stats.o
obj-$(CONFIG_SCHED_DEBUG) += sched_debug.o

ifdef CONFIG_FUNCTION_TRACER
# Do not trace debug files and internal ftrace files
CFLAGS_REMOVE_lockdep.o = -pg
CFLAGS_REMOVE_lockdep_proc.o = -pg
CFLAGS_REMOVE_mutex-debug.o = -pg
CFLAGS_REMOVE_rtmutex-debug.o = -pg
CFLAGS_REMOVE_cgroup-debug.o = -pg
CFLAGS_REMOVE_sched_clock.o = -pg
CFLAGS_REMOVE_irq_work.o = -pg
endif

obj-y += sched/

obj-$(CONFIG_FREEZER) += freezer.o
obj-$(CONFIG_PROFILING) += profile.o
obj-$(CONFIG_SYSCTL_SYSCALL_CHECK) += sysctl_check.o
Expand Down Expand Up @@ -103,7 +99,6 @@ obj-$(CONFIG_TRACING) += trace/
obj-$(CONFIG_X86_DS) += trace/
obj-$(CONFIG_RING_BUFFER) += trace/
obj-$(CONFIG_TRACEPOINTS) += trace/
obj-$(CONFIG_SMP) += sched_cpupri.o
obj-$(CONFIG_IRQ_WORK) += irq_work.o
obj-$(CONFIG_CPU_PM) += cpu_pm.o

Expand All @@ -114,15 +109,6 @@ obj-$(CONFIG_PADATA) += padata.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
obj-$(CONFIG_JUMP_LABEL) += jump_label.o

ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y)
# According to Alan Modra <[email protected]>, the -fno-omit-frame-pointer is
# needed for x86 only. Why this used to be enabled for all architectures is beyond
# me. I suspect most platforms don't need this, but until we know that for sure
# I turn this off for IA-64 only. Andreas Schwab says it's also needed on m68k
# to get a correct value for the wait-channel (WCHAN in ps). --davidm
CFLAGS_sched.o := $(PROFILING) -fno-omit-frame-pointer
endif

$(obj)/configs.o: $(obj)/config_data.h

# config_data.h contains the same information as ikconfig.h but gzipped.
Expand Down
20 changes: 20 additions & 0 deletions kernel/sched/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
ifdef CONFIG_FUNCTION_TRACER
CFLAGS_REMOVE_clock.o = -pg
endif

ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y)
# According to Alan Modra <[email protected]>, the -fno-omit-frame-pointer is
# needed for x86 only. Why this used to be enabled for all architectures is beyond
# me. I suspect most platforms don't need this, but until we know that for sure
# I turn this off for IA-64 only. Andreas Schwab says it's also needed on m68k
# to get a correct value for the wait-channel (WCHAN in ps). --davidm
CFLAGS_core.o := $(PROFILING) -fno-omit-frame-pointer
endif

obj-y += core.o clock.o idle_task.o fair.o rt.o stop_task.o
obj-$(CONFIG_SMP) += cpupri.o
obj-$(CONFIG_SCHED_AUTOGROUP) += auto_group.o
obj-$(CONFIG_SCHEDSTATS) += stats.o
obj-$(CONFIG_SCHED_DEBUG) += debug.o


File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions kernel/sched.c → kernel/sched/core.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* kernel/sched.c
* kernel/sched/core.c
*
* Kernel scheduler and related syscalls
*
Expand Down Expand Up @@ -79,7 +79,7 @@
#endif

#include "sched.h"
#include "workqueue_sched.h"
#include "../workqueue_sched.h"

#define CREATE_TRACE_POINTS
#include <trace/events/sched.h>
Expand Down Expand Up @@ -129,7 +129,7 @@ void update_rq_clock(struct rq *rq)
(1UL << __SCHED_FEAT_##name) * enabled |

const_debug unsigned int sysctl_sched_features =
#include "sched_features.h"
#include "features.h"
0;

#undef SCHED_FEAT
Expand All @@ -139,7 +139,7 @@ const_debug unsigned int sysctl_sched_features =
#name ,

static __read_mostly char *sched_feat_names[] = {
#include "sched_features.h"
#include "features.h"
NULL
};

Expand Down
4 changes: 2 additions & 2 deletions kernel/sched_cpupri.c → kernel/sched/cpupri.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* kernel/sched_cpupri.c
* kernel/sched/cpupri.c
*
* CPU priority management
*
Expand Down Expand Up @@ -28,7 +28,7 @@
*/

#include <linux/gfp.h>
#include "sched_cpupri.h"
#include "cpupri.h"

/* Convert between a 140 based task->prio, and our 102 based cpupri */
static int convert_prio(int prio)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion kernel/sched_debug.c → kernel/sched/debug.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* kernel/time/sched_debug.c
* kernel/sched/debug.c
*
* Print the CFS rbtree
*
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions kernel/sched.h → kernel/sched/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <linux/spinlock.h>
#include <linux/stop_machine.h>

#include "sched_cpupri.h"
#include "cpupri.h"

extern __read_mostly int scheduler_running;

Expand Down Expand Up @@ -507,8 +507,8 @@ DECLARE_PER_CPU(struct rq, runqueues);
#define cpu_curr(cpu) (cpu_rq(cpu)->curr)
#define raw_rq() (&__raw_get_cpu_var(runqueues))

#include "sched_stats.h"
#include "sched_autogroup.h"
#include "stats.h"
#include "auto_group.h"

#ifdef CONFIG_CGROUP_SCHED

Expand Down Expand Up @@ -590,7 +590,7 @@ extern const_debug unsigned int sysctl_sched_features;
__SCHED_FEAT_##name ,

enum {
#include "sched_features.h"
#include "features.h"
};

#undef SCHED_FEAT
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 391e43d

Please sign in to comment.