diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-19 12:47:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-19 12:47:49 -0500 |
commit | aac3d39693529ca538e37ebdb6ed5d6432a697c7 (patch) | |
tree | bb1b0c9fe0538008aa2c97c6f5d9dfc2a4c34190 /include | |
parent | 10e5453ffa0d04a2eda3cda3f55b88cb9c04595f (diff) | |
parent | 077614ee1e93245a3b9a4e1213659405dbeb0ba6 (diff) |
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (25 commits)
sched: Fix broken assertion
sched: Assert task state bits at build time
sched: Update task_state_arraypwith new states
sched: Add missing state chars to TASK_STATE_TO_CHAR_STR
sched: Move TASK_STATE_TO_CHAR_STR near the TASK_state bits
sched: Teach might_sleep() about preemptible RCU
sched: Make warning less noisy
sched: Simplify set_task_cpu()
sched: Remove the cfs_rq dependency from set_task_cpu()
sched: Add pre and post wakeup hooks
sched: Move kthread_bind() back to kthread.c
sched: Fix select_task_rq() vs hotplug issues
sched: Fix sched_exec() balancing
sched: Ensure set_task_cpu() is never called on blocked tasks
sched: Use TASK_WAKING for fork wakups
sched: Select_task_rq_fair() must honour SD_LOAD_BALANCE
sched: Fix task_hot() test order
sched: Fix set_cpu_active() in cpu_down()
sched: Mark boot-cpu active before smp_init()
sched: Fix cpu_clock() in NMIs, on !CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/rcutiny.h | 5 | ||||
-rw-r--r-- | include/linux/rcutree.h | 11 | ||||
-rw-r--r-- | include/linux/sched.h | 13 |
3 files changed, 25 insertions, 4 deletions
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index c4ba9a78721e..96cc307ed9f4 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
@@ -101,4 +101,9 @@ static inline void exit_rcu(void) | |||
101 | { | 101 | { |
102 | } | 102 | } |
103 | 103 | ||
104 | static inline int rcu_preempt_depth(void) | ||
105 | { | ||
106 | return 0; | ||
107 | } | ||
108 | |||
104 | #endif /* __LINUX_RCUTINY_H */ | 109 | #endif /* __LINUX_RCUTINY_H */ |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index c93eee5911b0..8044b1b94333 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
@@ -45,6 +45,12 @@ extern void __rcu_read_unlock(void); | |||
45 | extern void synchronize_rcu(void); | 45 | extern void synchronize_rcu(void); |
46 | extern void exit_rcu(void); | 46 | extern void exit_rcu(void); |
47 | 47 | ||
48 | /* | ||
49 | * Defined as macro as it is a very low level header | ||
50 | * included from areas that don't even know about current | ||
51 | */ | ||
52 | #define rcu_preempt_depth() (current->rcu_read_lock_nesting) | ||
53 | |||
48 | #else /* #ifdef CONFIG_TREE_PREEMPT_RCU */ | 54 | #else /* #ifdef CONFIG_TREE_PREEMPT_RCU */ |
49 | 55 | ||
50 | static inline void __rcu_read_lock(void) | 56 | static inline void __rcu_read_lock(void) |
@@ -63,6 +69,11 @@ static inline void exit_rcu(void) | |||
63 | { | 69 | { |
64 | } | 70 | } |
65 | 71 | ||
72 | static inline int rcu_preempt_depth(void) | ||
73 | { | ||
74 | return 0; | ||
75 | } | ||
76 | |||
66 | #endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */ | 77 | #endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */ |
67 | 78 | ||
68 | static inline void __rcu_read_lock_bh(void) | 79 | static inline void __rcu_read_lock_bh(void) |
diff --git a/include/linux/sched.h b/include/linux/sched.h index e89857812be6..f2f842db03ce 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -192,6 +192,12 @@ print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) | |||
192 | #define TASK_DEAD 64 | 192 | #define TASK_DEAD 64 |
193 | #define TASK_WAKEKILL 128 | 193 | #define TASK_WAKEKILL 128 |
194 | #define TASK_WAKING 256 | 194 | #define TASK_WAKING 256 |
195 | #define TASK_STATE_MAX 512 | ||
196 | |||
197 | #define TASK_STATE_TO_CHAR_STR "RSDTtZXxKW" | ||
198 | |||
199 | extern char ___assert_task_state[1 - 2*!!( | ||
200 | sizeof(TASK_STATE_TO_CHAR_STR)-1 != ilog2(TASK_STATE_MAX)+1)]; | ||
195 | 201 | ||
196 | /* Convenience macros for the sake of set_task_state */ | 202 | /* Convenience macros for the sake of set_task_state */ |
197 | #define TASK_KILLABLE (TASK_WAKEKILL | TASK_UNINTERRUPTIBLE) | 203 | #define TASK_KILLABLE (TASK_WAKEKILL | TASK_UNINTERRUPTIBLE) |
@@ -1091,7 +1097,8 @@ struct sched_class { | |||
1091 | enum cpu_idle_type idle); | 1097 | enum cpu_idle_type idle); |
1092 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); | 1098 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); |
1093 | void (*post_schedule) (struct rq *this_rq); | 1099 | void (*post_schedule) (struct rq *this_rq); |
1094 | void (*task_wake_up) (struct rq *this_rq, struct task_struct *task); | 1100 | void (*task_waking) (struct rq *this_rq, struct task_struct *task); |
1101 | void (*task_woken) (struct rq *this_rq, struct task_struct *task); | ||
1095 | 1102 | ||
1096 | void (*set_cpus_allowed)(struct task_struct *p, | 1103 | void (*set_cpus_allowed)(struct task_struct *p, |
1097 | const struct cpumask *newmask); | 1104 | const struct cpumask *newmask); |
@@ -1115,7 +1122,7 @@ struct sched_class { | |||
1115 | struct task_struct *task); | 1122 | struct task_struct *task); |
1116 | 1123 | ||
1117 | #ifdef CONFIG_FAIR_GROUP_SCHED | 1124 | #ifdef CONFIG_FAIR_GROUP_SCHED |
1118 | void (*moved_group) (struct task_struct *p); | 1125 | void (*moved_group) (struct task_struct *p, int on_rq); |
1119 | #endif | 1126 | #endif |
1120 | }; | 1127 | }; |
1121 | 1128 | ||
@@ -2594,8 +2601,6 @@ static inline void mm_init_owner(struct mm_struct *mm, struct task_struct *p) | |||
2594 | } | 2601 | } |
2595 | #endif /* CONFIG_MM_OWNER */ | 2602 | #endif /* CONFIG_MM_OWNER */ |
2596 | 2603 | ||
2597 | #define TASK_STATE_TO_CHAR_STR "RSDTtZX" | ||
2598 | |||
2599 | #endif /* __KERNEL__ */ | 2604 | #endif /* __KERNEL__ */ |
2600 | 2605 | ||
2601 | #endif | 2606 | #endif |