Skip to content

Commit

Permalink
sched: Make separate sched*.c translation units
Browse files Browse the repository at this point in the history
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 <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-x0fcd3mnp8f9c99grcpewmhi@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Nov 17, 2011
1 parent 6068631 commit 029632f
Show file tree
Hide file tree
Showing 14 changed files with 2,059 additions and 1,979 deletions.
3 changes: 2 additions & 1 deletion include/linux/latencytop.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#define _INCLUDE_GUARD_LATENCYTOP_H_

#include <linux/compiler.h>
struct task_struct;

#ifdef CONFIG_LATENCYTOP

#define LT_SAVECOUNT 32
Expand All @@ -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);
Expand Down
9 changes: 9 additions & 0 deletions include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
10 changes: 7 additions & 3 deletions kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@
# 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 \
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 \
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
Expand Down
Loading

0 comments on commit 029632f

Please sign in to comment.