summaryrefslogtreecommitdiffstats
path: root/kernel/srcu.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-12-23 12:57:04 +0100
committerIngo Molnar <mingo@elte.hu>2010-12-23 12:57:04 +0100
commit394f4528c523d88daabd50f883a8d6b164075555 (patch)
treeb45a5b87a1ba9be8afe71f1db1537ff19e2b05d8 /kernel/srcu.c
parent90a8a73c06cc32b609a880d48449d7083327e11a (diff)
parent3c2dcf2aed5ea22ecf65a9a871c4963faec421b3 (diff)
downloadop-kernel-dev-394f4528c523d88daabd50f883a8d6b164075555.zip
op-kernel-dev-394f4528c523d88daabd50f883a8d6b164075555.tar.gz
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 'kernel/srcu.c')
-rw-r--r--kernel/srcu.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/srcu.c b/kernel/srcu.c
index c71e075..98d8c1e 100644
--- a/kernel/srcu.c
+++ b/kernel/srcu.c
@@ -31,6 +31,7 @@
#include <linux/rcupdate.h>
#include <linux/sched.h>
#include <linux/smp.h>
+#include <linux/delay.h>
#include <linux/srcu.h>
static int init_srcu_struct_fields(struct srcu_struct *sp)
@@ -203,9 +204,14 @@ static void __synchronize_srcu(struct srcu_struct *sp, void (*sync_func)(void))
* all srcu_read_lock() calls using the old counters have completed.
* Their corresponding critical sections might well be still
* executing, but the srcu_read_lock() primitives themselves
- * will have finished executing.
+ * will have finished executing. We initially give readers
+ * an arbitrarily chosen 10 microseconds to get out of their
+ * SRCU read-side critical sections, then loop waiting 1/HZ
+ * seconds per iteration.
*/
+ if (srcu_readers_active_idx(sp, idx))
+ udelay(CONFIG_SRCU_SYNCHRONIZE_DELAY);
while (srcu_readers_active_idx(sp, idx))
schedule_timeout_interruptible(1);
OpenPOWER on IntegriCloud