diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-06 13:06:26 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-06 13:06:26 -0500 |
| commit | 2af49b6058d857fa5b476db642d4452bf5833ecd (patch) | |
| tree | dbce19fe5db5c34294a911baedd2e91bb897b9ce /include/linux | |
| parent | b08b27213384d1bd6eda04a2b6f788b4cdee0f34 (diff) | |
| parent | 394f4528c523d88daabd50f883a8d6b164075555 (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:
rcu: remove unused __list_for_each_rcu() macro
rculist: fix borked __list_for_each_rcu() macro
rcu: reduce __call_rcu()-induced contention on rcu_node structures
rcu: limit rcu_node leaf-level fanout
rcu: fine-tune grace-period begin/end checks
rcu: Keep gpnum and completed fields synchronized
rcu: Stop chasing QS if another CPU did it for us
rcu: increase synchronize_sched_expedited() batching
rcu: Make synchronize_srcu_expedited() fast if running readers
rcu: fix race condition in synchronize_sched_expedited()
rcu: update documentation/comments for Lai's adoption patch
rcu,cleanup: simplify the code when cpu is dying
rcu,cleanup: move synchronize_sched_expedited() out of sched.c
rcu: get rid of obsolete "classic" names in TREE_RCU tracing
rcu: Distinguish between boosting and boosted
rcu: document TINY_RCU and TINY_PREEMPT_RCU tracing.
rcu: add tracing for TINY_RCU and TINY_PREEMPT_RCU
rcu: priority boosting for TINY_PREEMPT_RCU
rcu: move TINY_RCU from softirq to kthread
rcu: add priority-inversion testing to rcutorture
Diffstat (limited to 'include/linux')
| -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 1f8c06ce0fa..6b281fae114 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 f31ef61f1c6..2dea94fc440 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 03cda7bed98..af561485628 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 13877cb93a6..30ebd7c8d87 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 95518e62879..3a933482734 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 223874538b3..d8005503cc6 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 | ||
