diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-11 16:20:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-11 16:20:18 -0400 |
commit | eee2775d9924b22643bd89b2e568cc5eed7e8a04 (patch) | |
tree | 095ad7851895c5d39596f3ff7ee1e078235a2501 /include/linux/sched.h | |
parent | 53e16fbd30005905168d9b75555fdc7e0a2eac58 (diff) | |
parent | 7db905e636f08ea5bc9825c1f73d77802e8ccad5 (diff) |
Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (28 commits)
rcu: Move end of special early-boot RCU operation earlier
rcu: Changes from reviews: avoid casts, fix/add warnings, improve comments
rcu: Create rcutree plugins to handle hotplug CPU for multi-level trees
rcu: Remove lockdep annotations from RCU's _notrace() API members
rcu: Add #ifdef to suppress __rcu_offline_cpu() warning in !HOTPLUG_CPU builds
rcu: Add CPU-offline processing for single-node configurations
rcu: Add "notrace" to RCU function headers used by ftrace
rcu: Remove CONFIG_PREEMPT_RCU
rcu: Merge preemptable-RCU functionality into hierarchical RCU
rcu: Simplify rcu_pending()/rcu_check_callbacks() API
rcu: Use debugfs_remove_recursive() simplify code.
rcu: Merge per-RCU-flavor initialization into pre-existing macro
rcu: Fix online/offline indication for rcudata.csv trace file
rcu: Consolidate sparse and lockdep declarations in include/linux/rcupdate.h
rcu: Renamings to increase RCU clarity
rcu: Move private definitions from include/linux/rcutree.h to kernel/rcutree.h
rcu: Expunge lingering references to CONFIG_CLASSIC_RCU, optimize on !SMP
rcu: Delay rcu_barrier() wait until beginning of next CPU-hotunplug operation.
rcu: Fix typo in rcu_irq_exit() comment header
rcu: Make rcupreempt_trace.c look at offline CPUs
...
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 9304027673b0..379531c08975 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1163,6 +1163,8 @@ struct sched_rt_entity { | |||
1163 | #endif | 1163 | #endif |
1164 | }; | 1164 | }; |
1165 | 1165 | ||
1166 | struct rcu_node; | ||
1167 | |||
1166 | struct task_struct { | 1168 | struct task_struct { |
1167 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ | 1169 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ |
1168 | void *stack; | 1170 | void *stack; |
@@ -1206,10 +1208,12 @@ struct task_struct { | |||
1206 | unsigned int policy; | 1208 | unsigned int policy; |
1207 | cpumask_t cpus_allowed; | 1209 | cpumask_t cpus_allowed; |
1208 | 1210 | ||
1209 | #ifdef CONFIG_PREEMPT_RCU | 1211 | #ifdef CONFIG_TREE_PREEMPT_RCU |
1210 | int rcu_read_lock_nesting; | 1212 | int rcu_read_lock_nesting; |
1211 | int rcu_flipctr_idx; | 1213 | char rcu_read_unlock_special; |
1212 | #endif /* #ifdef CONFIG_PREEMPT_RCU */ | 1214 | struct rcu_node *rcu_blocked_node; |
1215 | struct list_head rcu_node_entry; | ||
1216 | #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ | ||
1213 | 1217 | ||
1214 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) | 1218 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) |
1215 | struct sched_info sched_info; | 1219 | struct sched_info sched_info; |
@@ -1725,6 +1729,28 @@ extern cputime_t task_gtime(struct task_struct *p); | |||
1725 | #define tsk_used_math(p) ((p)->flags & PF_USED_MATH) | 1729 | #define tsk_used_math(p) ((p)->flags & PF_USED_MATH) |
1726 | #define used_math() tsk_used_math(current) | 1730 | #define used_math() tsk_used_math(current) |
1727 | 1731 | ||
1732 | #ifdef CONFIG_TREE_PREEMPT_RCU | ||
1733 | |||
1734 | #define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ | ||
1735 | #define RCU_READ_UNLOCK_NEED_QS (1 << 1) /* RCU core needs CPU response. */ | ||
1736 | #define RCU_READ_UNLOCK_GOT_QS (1 << 2) /* CPU has responded to RCU core. */ | ||
1737 | |||
1738 | static inline void rcu_copy_process(struct task_struct *p) | ||
1739 | { | ||
1740 | p->rcu_read_lock_nesting = 0; | ||
1741 | p->rcu_read_unlock_special = 0; | ||
1742 | p->rcu_blocked_node = NULL; | ||
1743 | INIT_LIST_HEAD(&p->rcu_node_entry); | ||
1744 | } | ||
1745 | |||
1746 | #else | ||
1747 | |||
1748 | static inline void rcu_copy_process(struct task_struct *p) | ||
1749 | { | ||
1750 | } | ||
1751 | |||
1752 | #endif | ||
1753 | |||
1728 | #ifdef CONFIG_SMP | 1754 | #ifdef CONFIG_SMP |
1729 | extern int set_cpus_allowed_ptr(struct task_struct *p, | 1755 | extern int set_cpus_allowed_ptr(struct task_struct *p, |
1730 | const struct cpumask *new_mask); | 1756 | const struct cpumask *new_mask); |