diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-03 15:15:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-03 15:15:00 -0400 |
commit | 00bcf5cdd6c0e2e92ce3dd852ca68a3b779fa4ec (patch) | |
tree | 387b2ed2ac0e35776714515665f25ddb5fee1de3 /kernel/rcu | |
parent | de956b8f45b3338cfb66a725e22b4050109daf2a (diff) | |
parent | 08645077b7f9f7824dbaf1959b0e014a894c8acc (diff) |
Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking updates from Ingo Molnar:
"The main changes in this cycle were:
- rwsem micro-optimizations (Davidlohr Bueso)
- Improve the implementation and optimize the performance of
percpu-rwsems. (Peter Zijlstra.)
- Convert all lglock users to better facilities such as percpu-rwsems
or percpu-spinlocks and remove lglocks. (Peter Zijlstra)
- Remove the ticket (spin)lock implementation. (Peter Zijlstra)
- Korean translation of memory-barriers.txt and related fixes to the
English document. (SeongJae Park)
- misc fixes and cleanups"
* 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
x86/cmpxchg, locking/atomics: Remove superfluous definitions
x86, locking/spinlocks: Remove ticket (spin)lock implementation
locking/lglock: Remove lglock implementation
stop_machine: Remove stop_cpus_lock and lg_double_lock/unlock()
fs/locks: Use percpu_down_read_preempt_disable()
locking/percpu-rwsem: Add down_read_preempt_disable()
fs/locks: Replace lg_local with a per-cpu spinlock
fs/locks: Replace lg_global with a percpu-rwsem
locking/percpu-rwsem: Add DEFINE_STATIC_PERCPU_RWSEMand percpu_rwsem_assert_held()
locking/pv-qspinlock: Use cmpxchg_release() in __pv_queued_spin_unlock()
locking/rwsem, x86: Drop a bogus cc clobber
futex: Add some more function commentry
locking/hung_task: Show all locks
locking/rwsem: Scan the wait_list for readers only once
locking/rwsem: Remove a few useless comments
locking/rwsem: Return void in __rwsem_mark_wake()
locking, rcu, cgroup: Avoid synchronize_sched() in __cgroup_procs_write()
locking/Documentation: Add Korean translation
locking/Documentation: Fix a typo of example result
locking/Documentation: Fix wrong section reference
...
Diffstat (limited to 'kernel/rcu')
-rw-r--r-- | kernel/rcu/sync.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/rcu/sync.c b/kernel/rcu/sync.c index be922c9f3d37..50d1861f7759 100644 --- a/kernel/rcu/sync.c +++ b/kernel/rcu/sync.c | |||
@@ -68,6 +68,8 @@ void rcu_sync_lockdep_assert(struct rcu_sync *rsp) | |||
68 | RCU_LOCKDEP_WARN(!gp_ops[rsp->gp_type].held(), | 68 | RCU_LOCKDEP_WARN(!gp_ops[rsp->gp_type].held(), |
69 | "suspicious rcu_sync_is_idle() usage"); | 69 | "suspicious rcu_sync_is_idle() usage"); |
70 | } | 70 | } |
71 | |||
72 | EXPORT_SYMBOL_GPL(rcu_sync_lockdep_assert); | ||
71 | #endif | 73 | #endif |
72 | 74 | ||
73 | /** | 75 | /** |
@@ -83,6 +85,18 @@ void rcu_sync_init(struct rcu_sync *rsp, enum rcu_sync_type type) | |||
83 | } | 85 | } |
84 | 86 | ||
85 | /** | 87 | /** |
88 | * Must be called after rcu_sync_init() and before first use. | ||
89 | * | ||
90 | * Ensures rcu_sync_is_idle() returns false and rcu_sync_{enter,exit}() | ||
91 | * pairs turn into NO-OPs. | ||
92 | */ | ||
93 | void rcu_sync_enter_start(struct rcu_sync *rsp) | ||
94 | { | ||
95 | rsp->gp_count++; | ||
96 | rsp->gp_state = GP_PASSED; | ||
97 | } | ||
98 | |||
99 | /** | ||
86 | * rcu_sync_enter() - Force readers onto slowpath | 100 | * rcu_sync_enter() - Force readers onto slowpath |
87 | * @rsp: Pointer to rcu_sync structure to use for synchronization | 101 | * @rsp: Pointer to rcu_sync structure to use for synchronization |
88 | * | 102 | * |