diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2010-07-08 20:38:59 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2010-08-19 20:18:02 -0400 |
commit | 77d8485a8b5416c615b6acd95f01bfcacd7d81ff (patch) | |
tree | 725742c078b9712d875e9c633d249b6da14e5f00 /include | |
parent | 742734eea0cf5314cde5945963ed964be167bd84 (diff) |
rcu: improve kerneldoc for rcu_read_lock(), call_rcu(), and synchronize_rcu()
Make it explicit that new RCU read-side critical sections that start
after call_rcu() and synchronize_rcu() start might still be running
after the end of the relevant grace period.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/rcupdate.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index b124bc6a75ad..3e1b6625553b 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -450,7 +450,7 @@ extern int rcu_my_thread_group_empty(void); | |||
450 | * until after the all the other CPUs exit their critical sections. | 450 | * until after the all the other CPUs exit their critical sections. |
451 | * | 451 | * |
452 | * Note, however, that RCU callbacks are permitted to run concurrently | 452 | * Note, however, that RCU callbacks are permitted to run concurrently |
453 | * with RCU read-side critical sections. One way that this can happen | 453 | * with new RCU read-side critical sections. One way that this can happen |
454 | * is via the following sequence of events: (1) CPU 0 enters an RCU | 454 | * is via the following sequence of events: (1) CPU 0 enters an RCU |
455 | * read-side critical section, (2) CPU 1 invokes call_rcu() to register | 455 | * read-side critical section, (2) CPU 1 invokes call_rcu() to register |
456 | * an RCU callback, (3) CPU 0 exits the RCU read-side critical section, | 456 | * an RCU callback, (3) CPU 0 exits the RCU read-side critical section, |
@@ -608,11 +608,13 @@ extern void wakeme_after_rcu(struct rcu_head *head); | |||
608 | /** | 608 | /** |
609 | * call_rcu() - Queue an RCU callback for invocation after a grace period. | 609 | * call_rcu() - Queue an RCU callback for invocation after a grace period. |
610 | * @head: structure to be used for queueing the RCU updates. | 610 | * @head: structure to be used for queueing the RCU updates. |
611 | * @func: actual update function to be invoked after the grace period | 611 | * @func: actual callback function to be invoked after the grace period |
612 | * | 612 | * |
613 | * The update function will be invoked some time after a full grace | 613 | * The callback function will be invoked some time after a full grace |
614 | * period elapses, in other words after all currently executing RCU | 614 | * period elapses, in other words after all pre-existing RCU read-side |
615 | * read-side critical sections have completed. RCU read-side critical | 615 | * critical sections have completed. However, the callback function |
616 | * might well execute concurrently with RCU read-side critical sections | ||
617 | * that started after call_rcu() was invoked. RCU read-side critical | ||
616 | * sections are delimited by rcu_read_lock() and rcu_read_unlock(), | 618 | * sections are delimited by rcu_read_lock() and rcu_read_unlock(), |
617 | * and may be nested. | 619 | * and may be nested. |
618 | */ | 620 | */ |
@@ -622,9 +624,9 @@ extern void call_rcu(struct rcu_head *head, | |||
622 | /** | 624 | /** |
623 | * call_rcu_bh() - Queue an RCU for invocation after a quicker grace period. | 625 | * call_rcu_bh() - Queue an RCU for invocation after a quicker grace period. |
624 | * @head: structure to be used for queueing the RCU updates. | 626 | * @head: structure to be used for queueing the RCU updates. |
625 | * @func: actual update function to be invoked after the grace period | 627 | * @func: actual callback function to be invoked after the grace period |
626 | * | 628 | * |
627 | * The update function will be invoked some time after a full grace | 629 | * The callback function will be invoked some time after a full grace |
628 | * period elapses, in other words after all currently executing RCU | 630 | * period elapses, in other words after all currently executing RCU |
629 | * read-side critical sections have completed. call_rcu_bh() assumes | 631 | * read-side critical sections have completed. call_rcu_bh() assumes |
630 | * that the read-side critical sections end on completion of a softirq | 632 | * that the read-side critical sections end on completion of a softirq |