diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-05 18:30:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-05 18:30:49 -0500 |
commit | 897e81bea1fcfcd2c5cdb720c9efdb25da9ff374 (patch) | |
tree | 92cf33ed2c35c1ece633f09365702f1c8e24d415 /include | |
parent | c3fa27d1367fac63ac8533d6f20ea851d0d70a10 (diff) | |
parent | 0cf55e1ec08bb5a22e068309e2d8ba1180ab4239 (diff) |
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (35 commits)
sched, cputime: Introduce thread_group_times()
sched, cputime: Cleanups related to task_times()
Revert "sched, x86: Optimize branch hint in __switch_to()"
sched: Fix isolcpus boot option
sched: Revert 498657a478c60be092208422fefa9c7b248729c2
sched, time: Define nsecs_to_jiffies()
sched: Remove task_{u,s,g}time()
sched: Introduce task_times() to replace task_{u,s}time() pair
sched: Limit the number of scheduler debug messages
sched.c: Call debug_show_all_locks() when dumping all tasks
sched, x86: Optimize branch hint in __switch_to()
sched: Optimize branch hint in context_switch()
sched: Optimize branch hint in pick_next_task_fair()
sched_feat_write(): Update ppos instead of file->f_pos
sched: Sched_rt_periodic_timer vs cpu hotplug
sched, kvm: Fix race condition involving sched_in_preempt_notifers
sched: More generic WAKE_AFFINE vs select_idle_sibling()
sched: Cleanup select_task_rq_fair()
sched: Fix granularity of task_u/stime()
sched: Fix/add missing update_rq_clock() calls
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/jiffies.h | 1 | ||||
-rw-r--r-- | include/linux/kernel_stat.h | 1 | ||||
-rw-r--r-- | include/linux/preempt.h | 5 | ||||
-rw-r--r-- | include/linux/sched.h | 22 |
4 files changed, 20 insertions, 9 deletions
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 1a9cf78bfce5..6811f4bfc6e7 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -307,6 +307,7 @@ extern clock_t jiffies_to_clock_t(long x); | |||
307 | extern unsigned long clock_t_to_jiffies(unsigned long x); | 307 | extern unsigned long clock_t_to_jiffies(unsigned long x); |
308 | extern u64 jiffies_64_to_clock_t(u64 x); | 308 | extern u64 jiffies_64_to_clock_t(u64 x); |
309 | extern u64 nsec_to_clock_t(u64 x); | 309 | extern u64 nsec_to_clock_t(u64 x); |
310 | extern unsigned long nsecs_to_jiffies(u64 n); | ||
310 | 311 | ||
311 | #define TIMESTAMP_SIZE 30 | 312 | #define TIMESTAMP_SIZE 30 |
312 | 313 | ||
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index 348fa8874b52..c059044bc6dc 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
@@ -25,6 +25,7 @@ struct cpu_usage_stat { | |||
25 | cputime64_t iowait; | 25 | cputime64_t iowait; |
26 | cputime64_t steal; | 26 | cputime64_t steal; |
27 | cputime64_t guest; | 27 | cputime64_t guest; |
28 | cputime64_t guest_nice; | ||
28 | }; | 29 | }; |
29 | 30 | ||
30 | struct kernel_stat { | 31 | struct kernel_stat { |
diff --git a/include/linux/preempt.h b/include/linux/preempt.h index 72b1a10a59b6..2e681d9555bd 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h | |||
@@ -105,6 +105,11 @@ struct preempt_notifier; | |||
105 | * @sched_out: we've just been preempted | 105 | * @sched_out: we've just been preempted |
106 | * notifier: struct preempt_notifier for the task being preempted | 106 | * notifier: struct preempt_notifier for the task being preempted |
107 | * next: the task that's kicking us out | 107 | * next: the task that's kicking us out |
108 | * | ||
109 | * Please note that sched_in and out are called under different | ||
110 | * contexts. sched_out is called with rq lock held and irq disabled | ||
111 | * while sched_in is called without rq lock and irq enabled. This | ||
112 | * difference is intentional and depended upon by its users. | ||
108 | */ | 113 | */ |
109 | struct preempt_ops { | 114 | struct preempt_ops { |
110 | void (*sched_in)(struct preempt_notifier *notifier, int cpu); | 115 | void (*sched_in)(struct preempt_notifier *notifier, int cpu); |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 882dc48163b4..89115ec7d43f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -145,7 +145,6 @@ extern unsigned long this_cpu_load(void); | |||
145 | 145 | ||
146 | 146 | ||
147 | extern void calc_global_load(void); | 147 | extern void calc_global_load(void); |
148 | extern u64 cpu_nr_migrations(int cpu); | ||
149 | 148 | ||
150 | extern unsigned long get_parent_ip(unsigned long addr); | 149 | extern unsigned long get_parent_ip(unsigned long addr); |
151 | 150 | ||
@@ -171,8 +170,6 @@ print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) | |||
171 | } | 170 | } |
172 | #endif | 171 | #endif |
173 | 172 | ||
174 | extern unsigned long long time_sync_thresh; | ||
175 | |||
176 | /* | 173 | /* |
177 | * Task state bitmask. NOTE! These bits are also | 174 | * Task state bitmask. NOTE! These bits are also |
178 | * encoded in fs/proc/array.c: get_task_state(). | 175 | * encoded in fs/proc/array.c: get_task_state(). |
@@ -349,7 +346,6 @@ extern signed long schedule_timeout(signed long timeout); | |||
349 | extern signed long schedule_timeout_interruptible(signed long timeout); | 346 | extern signed long schedule_timeout_interruptible(signed long timeout); |
350 | extern signed long schedule_timeout_killable(signed long timeout); | 347 | extern signed long schedule_timeout_killable(signed long timeout); |
351 | extern signed long schedule_timeout_uninterruptible(signed long timeout); | 348 | extern signed long schedule_timeout_uninterruptible(signed long timeout); |
352 | asmlinkage void __schedule(void); | ||
353 | asmlinkage void schedule(void); | 349 | asmlinkage void schedule(void); |
354 | extern int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner); | 350 | extern int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner); |
355 | 351 | ||
@@ -628,6 +624,9 @@ struct signal_struct { | |||
628 | cputime_t utime, stime, cutime, cstime; | 624 | cputime_t utime, stime, cutime, cstime; |
629 | cputime_t gtime; | 625 | cputime_t gtime; |
630 | cputime_t cgtime; | 626 | cputime_t cgtime; |
627 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING | ||
628 | cputime_t prev_utime, prev_stime; | ||
629 | #endif | ||
631 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; | 630 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; |
632 | unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; | 631 | unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; |
633 | unsigned long inblock, oublock, cinblock, coublock; | 632 | unsigned long inblock, oublock, cinblock, coublock; |
@@ -1013,9 +1012,13 @@ static inline struct cpumask *sched_domain_span(struct sched_domain *sd) | |||
1013 | return to_cpumask(sd->span); | 1012 | return to_cpumask(sd->span); |
1014 | } | 1013 | } |
1015 | 1014 | ||
1016 | extern void partition_sched_domains(int ndoms_new, struct cpumask *doms_new, | 1015 | extern void partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[], |
1017 | struct sched_domain_attr *dattr_new); | 1016 | struct sched_domain_attr *dattr_new); |
1018 | 1017 | ||
1018 | /* Allocate an array of sched domains, for partition_sched_domains(). */ | ||
1019 | cpumask_var_t *alloc_sched_domains(unsigned int ndoms); | ||
1020 | void free_sched_domains(cpumask_var_t doms[], unsigned int ndoms); | ||
1021 | |||
1019 | /* Test a flag in parent sched domain */ | 1022 | /* Test a flag in parent sched domain */ |
1020 | static inline int test_sd_parent(struct sched_domain *sd, int flag) | 1023 | static inline int test_sd_parent(struct sched_domain *sd, int flag) |
1021 | { | 1024 | { |
@@ -1033,7 +1036,7 @@ unsigned long default_scale_smt_power(struct sched_domain *sd, int cpu); | |||
1033 | struct sched_domain_attr; | 1036 | struct sched_domain_attr; |
1034 | 1037 | ||
1035 | static inline void | 1038 | static inline void |
1036 | partition_sched_domains(int ndoms_new, struct cpumask *doms_new, | 1039 | partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[], |
1037 | struct sched_domain_attr *dattr_new) | 1040 | struct sched_domain_attr *dattr_new) |
1038 | { | 1041 | { |
1039 | } | 1042 | } |
@@ -1331,7 +1334,9 @@ struct task_struct { | |||
1331 | 1334 | ||
1332 | cputime_t utime, stime, utimescaled, stimescaled; | 1335 | cputime_t utime, stime, utimescaled, stimescaled; |
1333 | cputime_t gtime; | 1336 | cputime_t gtime; |
1337 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING | ||
1334 | cputime_t prev_utime, prev_stime; | 1338 | cputime_t prev_utime, prev_stime; |
1339 | #endif | ||
1335 | unsigned long nvcsw, nivcsw; /* context switch counts */ | 1340 | unsigned long nvcsw, nivcsw; /* context switch counts */ |
1336 | struct timespec start_time; /* monotonic time */ | 1341 | struct timespec start_time; /* monotonic time */ |
1337 | struct timespec real_start_time; /* boot based time */ | 1342 | struct timespec real_start_time; /* boot based time */ |
@@ -1720,9 +1725,8 @@ static inline void put_task_struct(struct task_struct *t) | |||
1720 | __put_task_struct(t); | 1725 | __put_task_struct(t); |
1721 | } | 1726 | } |
1722 | 1727 | ||
1723 | extern cputime_t task_utime(struct task_struct *p); | 1728 | extern void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st); |
1724 | extern cputime_t task_stime(struct task_struct *p); | 1729 | extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *st); |
1725 | extern cputime_t task_gtime(struct task_struct *p); | ||
1726 | 1730 | ||
1727 | /* | 1731 | /* |
1728 | * Per process flags | 1732 | * Per process flags |