sched: Make separate sched*.c translation units
Commit-ID: 029632fbb7b7c9d85063cc9eb470de6c54873df3 Gitweb: http://git.kernel.org/tip/029632fbb7b7c9d85063cc9eb470de6c54873df3 Author: Peter Zijlstra <[email protected]> AuthorDate: Tue, 25 Oct 2011 10:00:11 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Thu, 17 Nov 2011 12:20:19 +0100
sched: Make separate sched*.c translation units
Since once needs to do something at conferences and fixing compile warnings doesn't actually require much if any attention I decided to break up the sched.c #include "*.c" fest.
This further modularizes the scheduler code.
Signed-off-by Peter Zijlstra <[email protected]>
Signed-off-by Ingo Molnar <[email protected]>
--- include/linux/latencytop.h | 3 +- include/linux/sched.h | 9 + kernel/Makefile | 10 +- kernel/sched.c | 1878 ++------------------------------------------ kernel/sched.h | 1064 +++++++++++++++++++++++++ kernel/sched_autogroup.c | 33 +- kernel/sched_autogroup.h | 26 +- kernel/sched_debug.c | 4 +- kernel/sched_fair.c | 580 +++++++++++++- kernel/sched_idletask.c | 4 +- kernel/sched_rt.c | 209 +++++- kernel/sched_stats.c | 111 +++ kernel/sched_stats.h | 103 --- kernel/sched_stoptask.c | 4 +- 14 files changed, 2059 insertions(+), 1979 deletions(-)
include/linux/latencytop.h +2 -1
@@ -10,6 +10,8 @@#define _INCLUDE_GUARD_LATENCYTOP_H_#include <linux/compiler.h> +struct task_struct ; +#ifdef CONFIG_LATENCYTOP #define LT_SAVECOUNT 32
@@ -23,7 +25,6 @@ struct latency_record { }; -struct task_struct ;extern int latencytop_enabled;void __account_scheduler_latency (struct task_struct *task,int usecs,int inter);
include/linux/sched.h +9 -0
@@ -925,6 +925,15 @@ static inline struct cpumask *sched_group_cpus(struct sched_group *sg)return to_cpumask (sg->cpumask); } +/** +* group_first_cpu - Returns the first cpu in the cpumask of a sched_group. +* @group: The group whose first cpu is to be returned. +*/ +static inline unsigned int group_first_cpu (struct sched_group *group) +{ +return cpumask_first (sched_group_cpus (group)); +} +struct sched_domain_attr {int relax_domain_level; };
kernel/Makefile +7 -3
@@ -2,7 +2,7 @@ # Makefile for the linux kernel. # -obj-y = sched.o fork.o exec_domain.o panic.o printk.o \ +obj-y = fork.o exec_domain.o panic.o printk.o \ cpu.o exit.o itimer.o time.o softirq.o resource.o \ sysctl.o sysctl_binary.o capability.o ptrace.o timer.o user.o \ signal.o sys.o kmod.o workqueue.o pid.o \
@@ -10,8 +10,12 @@ obj-y = sched.o fork.o exec_domain.o panic.o printk.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 \ - async.o range.o -obj-y += groups.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
kernel/sched.c +80 -1798
2,212 lines not on this page · raw message
kernel/sched.h new file +1064 -0
736 lines not on this page · raw message
kernel/sched_fair.c +542 -38
580 lines not on this page · raw message
kernel/sched_rt.c +203 -6
209 lines not on this page · raw message
kernel/sched_stats.c new file +111 -0
111 lines not on this page · raw message
kernel/sched_stats.h +0 -103
103 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.