mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
[PATCH] rcu file: use atomic primitives
Use atomic_inc_not_zero for rcu files instead of special case rcuref. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: "Paul E. McKenney" <paulmck@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
a57004e1af
commit
095975da26
9 changed files with 48 additions and 291 deletions
|
@ -46,7 +46,6 @@
|
|||
#include <linux/percpu.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/rcupdate.h>
|
||||
#include <linux/rcuref.h>
|
||||
#include <linux/cpu.h>
|
||||
|
||||
/* Definition for rcupdate control block. */
|
||||
|
@ -74,19 +73,6 @@ DEFINE_PER_CPU(struct rcu_data, rcu_bh_data) = { 0L };
|
|||
static DEFINE_PER_CPU(struct tasklet_struct, rcu_tasklet) = {NULL};
|
||||
static int maxbatch = 10000;
|
||||
|
||||
#ifndef __HAVE_ARCH_CMPXCHG
|
||||
/*
|
||||
* We use an array of spinlocks for the rcurefs -- similar to ones in sparc
|
||||
* 32 bit atomic_t implementations, and a hash function similar to that
|
||||
* for our refcounting needs.
|
||||
* Can't help multiprocessors which donot have cmpxchg :(
|
||||
*/
|
||||
|
||||
spinlock_t __rcuref_hash[RCUREF_HASH_SIZE] = {
|
||||
[0 ... (RCUREF_HASH_SIZE-1)] = SPIN_LOCK_UNLOCKED
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* call_rcu - Queue an RCU callback for invocation after a grace period.
|
||||
* @head: structure to be used for queueing the RCU updates.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue