diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-12-23 06:57:04 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-12-23 06:57:04 -0500 |
commit | 394f4528c523d88daabd50f883a8d6b164075555 (patch) | |
tree | b45a5b87a1ba9be8afe71f1db1537ff19e2b05d8 /include | |
parent | 90a8a73c06cc32b609a880d48449d7083327e11a (diff) | |
parent | 3c2dcf2aed5ea22ecf65a9a871c4963faec421b3 (diff) |
Merge branch 'rcu/next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-2.6-rcu into core/rcu
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/init_task.h | 9 | ||||
-rw-r--r-- | include/linux/rculist.h | 5 | ||||
-rw-r--r-- | include/linux/rcupdate.h | 4 | ||||
-rw-r--r-- | include/linux/rcutiny.h | 13 | ||||
-rw-r--r-- | include/linux/rcutree.h | 2 | ||||
-rw-r--r-- | include/linux/sched.h | 11 |
6 files changed, 29 insertions, 15 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 1f8c06ce0fa6..6b281fae114a 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -83,6 +83,12 @@ extern struct group_info init_groups; | |||
83 | */ | 83 | */ |
84 | # define CAP_INIT_BSET CAP_FULL_SET | 84 | # define CAP_INIT_BSET CAP_FULL_SET |
85 | 85 | ||
86 | #ifdef CONFIG_RCU_BOOST | ||
87 | #define INIT_TASK_RCU_BOOST() \ | ||
88 | .rcu_boost_mutex = NULL, | ||
89 | #else | ||
90 | #define INIT_TASK_RCU_BOOST() | ||
91 | #endif | ||
86 | #ifdef CONFIG_TREE_PREEMPT_RCU | 92 | #ifdef CONFIG_TREE_PREEMPT_RCU |
87 | #define INIT_TASK_RCU_TREE_PREEMPT() \ | 93 | #define INIT_TASK_RCU_TREE_PREEMPT() \ |
88 | .rcu_blocked_node = NULL, | 94 | .rcu_blocked_node = NULL, |
@@ -94,7 +100,8 @@ extern struct group_info init_groups; | |||
94 | .rcu_read_lock_nesting = 0, \ | 100 | .rcu_read_lock_nesting = 0, \ |
95 | .rcu_read_unlock_special = 0, \ | 101 | .rcu_read_unlock_special = 0, \ |
96 | .rcu_node_entry = LIST_HEAD_INIT(tsk.rcu_node_entry), \ | 102 | .rcu_node_entry = LIST_HEAD_INIT(tsk.rcu_node_entry), \ |
97 | INIT_TASK_RCU_TREE_PREEMPT() | 103 | INIT_TASK_RCU_TREE_PREEMPT() \ |
104 | INIT_TASK_RCU_BOOST() | ||
98 | #else | 105 | #else |
99 | #define INIT_TASK_RCU_PREEMPT(tsk) | 106 | #define INIT_TASK_RCU_PREEMPT(tsk) |
100 | #endif | 107 | #endif |
diff --git a/include/linux/rculist.h b/include/linux/rculist.h index f31ef61f1c65..2dea94fc4402 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h | |||
@@ -241,11 +241,6 @@ static inline void list_splice_init_rcu(struct list_head *list, | |||
241 | #define list_first_entry_rcu(ptr, type, member) \ | 241 | #define list_first_entry_rcu(ptr, type, member) \ |
242 | list_entry_rcu((ptr)->next, type, member) | 242 | list_entry_rcu((ptr)->next, type, member) |
243 | 243 | ||
244 | #define __list_for_each_rcu(pos, head) \ | ||
245 | for (pos = rcu_dereference_raw(list_next_rcu(head)); \ | ||
246 | pos != (head); \ | ||
247 | pos = rcu_dereference_raw(list_next_rcu((pos))) | ||
248 | |||
249 | /** | 244 | /** |
250 | * list_for_each_entry_rcu - iterate over rcu list of given type | 245 | * list_for_each_entry_rcu - iterate over rcu list of given type |
251 | * @pos: the type * to use as a loop cursor. | 246 | * @pos: the type * to use as a loop cursor. |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 03cda7bed985..af5614856285 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -47,6 +47,8 @@ | |||
47 | extern int rcutorture_runnable; /* for sysctl */ | 47 | extern int rcutorture_runnable; /* for sysctl */ |
48 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ | 48 | #endif /* #ifdef CONFIG_RCU_TORTURE_TEST */ |
49 | 49 | ||
50 | #define UINT_CMP_GE(a, b) (UINT_MAX / 2 >= (a) - (b)) | ||
51 | #define UINT_CMP_LT(a, b) (UINT_MAX / 2 < (a) - (b)) | ||
50 | #define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) | 52 | #define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) |
51 | #define ULONG_CMP_LT(a, b) (ULONG_MAX / 2 < (a) - (b)) | 53 | #define ULONG_CMP_LT(a, b) (ULONG_MAX / 2 < (a) - (b)) |
52 | 54 | ||
@@ -66,7 +68,6 @@ extern void call_rcu_sched(struct rcu_head *head, | |||
66 | extern void synchronize_sched(void); | 68 | extern void synchronize_sched(void); |
67 | extern void rcu_barrier_bh(void); | 69 | extern void rcu_barrier_bh(void); |
68 | extern void rcu_barrier_sched(void); | 70 | extern void rcu_barrier_sched(void); |
69 | extern void synchronize_sched_expedited(void); | ||
70 | extern int sched_expedited_torture_stats(char *page); | 71 | extern int sched_expedited_torture_stats(char *page); |
71 | 72 | ||
72 | static inline void __rcu_read_lock_bh(void) | 73 | static inline void __rcu_read_lock_bh(void) |
@@ -118,7 +119,6 @@ static inline int rcu_preempt_depth(void) | |||
118 | #endif /* #else #ifdef CONFIG_PREEMPT_RCU */ | 119 | #endif /* #else #ifdef CONFIG_PREEMPT_RCU */ |
119 | 120 | ||
120 | /* Internal to kernel */ | 121 | /* Internal to kernel */ |
121 | extern void rcu_init(void); | ||
122 | extern void rcu_sched_qs(int cpu); | 122 | extern void rcu_sched_qs(int cpu); |
123 | extern void rcu_bh_qs(int cpu); | 123 | extern void rcu_bh_qs(int cpu); |
124 | extern void rcu_check_callbacks(int cpu, int user); | 124 | extern void rcu_check_callbacks(int cpu, int user); |
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index 13877cb93a60..30ebd7c8d874 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
@@ -27,7 +27,9 @@ | |||
27 | 27 | ||
28 | #include <linux/cache.h> | 28 | #include <linux/cache.h> |
29 | 29 | ||
30 | #define rcu_init_sched() do { } while (0) | 30 | static inline void rcu_init(void) |
31 | { | ||
32 | } | ||
31 | 33 | ||
32 | #ifdef CONFIG_TINY_RCU | 34 | #ifdef CONFIG_TINY_RCU |
33 | 35 | ||
@@ -58,6 +60,11 @@ static inline void synchronize_rcu_bh_expedited(void) | |||
58 | synchronize_sched(); | 60 | synchronize_sched(); |
59 | } | 61 | } |
60 | 62 | ||
63 | static inline void synchronize_sched_expedited(void) | ||
64 | { | ||
65 | synchronize_sched(); | ||
66 | } | ||
67 | |||
61 | #ifdef CONFIG_TINY_RCU | 68 | #ifdef CONFIG_TINY_RCU |
62 | 69 | ||
63 | static inline void rcu_preempt_note_context_switch(void) | 70 | static inline void rcu_preempt_note_context_switch(void) |
@@ -125,16 +132,12 @@ static inline void rcu_cpu_stall_reset(void) | |||
125 | } | 132 | } |
126 | 133 | ||
127 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 134 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
128 | |||
129 | extern int rcu_scheduler_active __read_mostly; | 135 | extern int rcu_scheduler_active __read_mostly; |
130 | extern void rcu_scheduler_starting(void); | 136 | extern void rcu_scheduler_starting(void); |
131 | |||
132 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | 137 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ |
133 | |||
134 | static inline void rcu_scheduler_starting(void) | 138 | static inline void rcu_scheduler_starting(void) |
135 | { | 139 | { |
136 | } | 140 | } |
137 | |||
138 | #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | 141 | #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ |
139 | 142 | ||
140 | #endif /* __LINUX_RCUTINY_H */ | 143 | #endif /* __LINUX_RCUTINY_H */ |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 95518e628794..3a933482734a 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #ifndef __LINUX_RCUTREE_H | 30 | #ifndef __LINUX_RCUTREE_H |
31 | #define __LINUX_RCUTREE_H | 31 | #define __LINUX_RCUTREE_H |
32 | 32 | ||
33 | extern void rcu_init(void); | ||
33 | extern void rcu_note_context_switch(int cpu); | 34 | extern void rcu_note_context_switch(int cpu); |
34 | extern int rcu_needs_cpu(int cpu); | 35 | extern int rcu_needs_cpu(int cpu); |
35 | extern void rcu_cpu_stall_reset(void); | 36 | extern void rcu_cpu_stall_reset(void); |
@@ -47,6 +48,7 @@ static inline void exit_rcu(void) | |||
47 | #endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */ | 48 | #endif /* #else #ifdef CONFIG_TREE_PREEMPT_RCU */ |
48 | 49 | ||
49 | extern void synchronize_rcu_bh(void); | 50 | extern void synchronize_rcu_bh(void); |
51 | extern void synchronize_sched_expedited(void); | ||
50 | extern void synchronize_rcu_expedited(void); | 52 | extern void synchronize_rcu_expedited(void); |
51 | 53 | ||
52 | static inline void synchronize_rcu_bh_expedited(void) | 54 | static inline void synchronize_rcu_bh_expedited(void) |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 223874538b33..d8005503cc62 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1229,6 +1229,9 @@ struct task_struct { | |||
1229 | #ifdef CONFIG_TREE_PREEMPT_RCU | 1229 | #ifdef CONFIG_TREE_PREEMPT_RCU |
1230 | struct rcu_node *rcu_blocked_node; | 1230 | struct rcu_node *rcu_blocked_node; |
1231 | #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ | 1231 | #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ |
1232 | #ifdef CONFIG_RCU_BOOST | ||
1233 | struct rt_mutex *rcu_boost_mutex; | ||
1234 | #endif /* #ifdef CONFIG_RCU_BOOST */ | ||
1232 | 1235 | ||
1233 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) | 1236 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) |
1234 | struct sched_info sched_info; | 1237 | struct sched_info sched_info; |
@@ -1759,7 +1762,8 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t * | |||
1759 | #ifdef CONFIG_PREEMPT_RCU | 1762 | #ifdef CONFIG_PREEMPT_RCU |
1760 | 1763 | ||
1761 | #define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ | 1764 | #define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ |
1762 | #define RCU_READ_UNLOCK_NEED_QS (1 << 1) /* RCU core needs CPU response. */ | 1765 | #define RCU_READ_UNLOCK_BOOSTED (1 << 1) /* boosted while in RCU read-side. */ |
1766 | #define RCU_READ_UNLOCK_NEED_QS (1 << 2) /* RCU core needs CPU response. */ | ||
1763 | 1767 | ||
1764 | static inline void rcu_copy_process(struct task_struct *p) | 1768 | static inline void rcu_copy_process(struct task_struct *p) |
1765 | { | 1769 | { |
@@ -1767,7 +1771,10 @@ static inline void rcu_copy_process(struct task_struct *p) | |||
1767 | p->rcu_read_unlock_special = 0; | 1771 | p->rcu_read_unlock_special = 0; |
1768 | #ifdef CONFIG_TREE_PREEMPT_RCU | 1772 | #ifdef CONFIG_TREE_PREEMPT_RCU |
1769 | p->rcu_blocked_node = NULL; | 1773 | p->rcu_blocked_node = NULL; |
1770 | #endif | 1774 | #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ |
1775 | #ifdef CONFIG_RCU_BOOST | ||
1776 | p->rcu_boost_mutex = NULL; | ||
1777 | #endif /* #ifdef CONFIG_RCU_BOOST */ | ||
1771 | INIT_LIST_HEAD(&p->rcu_node_entry); | 1778 | INIT_LIST_HEAD(&p->rcu_node_entry); |
1772 | } | 1779 | } |
1773 | 1780 | ||