diff options
author | Dipankar Sarma <dipankar@in.ibm.com> | 2005-12-12 03:37:05 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-12 11:57:42 -0500 |
commit | ab4720ec76b756e1f8705e207a7b392b0453afd6 (patch) | |
tree | 1c4235ec8ac0e8e7f75a6f97ea6169e93647004f /include | |
parent | 85b872424984e79519be904e7df02a91ba0a9486 (diff) |
[PATCH] add rcu_barrier() synchronization point
This introduces a new interface - rcu_barrier() which waits until all
the RCUs queued until this call have been completed.
Reiser4 needs this, because we do more than just freeing memory object
in our RCU callback: we also remove it from the list hanging off
super-block. This means, that before freeing reiser4-specific portion
of super-block (during umount) we have to wait until all pending RCU
callbacks are executed.
The only change of reiser4 made to the original patch, is exporting of
rcu_barrier().
Cc: Hans Reiser <reiser@namesys.com>
Cc: Vladimir V. Saveliev <vs@namesys.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/rcupdate.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index cce25591eec2..a471f3bb713e 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -100,6 +100,7 @@ struct rcu_data { | |||
100 | struct rcu_head *donelist; | 100 | struct rcu_head *donelist; |
101 | struct rcu_head **donetail; | 101 | struct rcu_head **donetail; |
102 | int cpu; | 102 | int cpu; |
103 | struct rcu_head barrier; | ||
103 | }; | 104 | }; |
104 | 105 | ||
105 | DECLARE_PER_CPU(struct rcu_data, rcu_data); | 106 | DECLARE_PER_CPU(struct rcu_data, rcu_data); |
@@ -285,6 +286,7 @@ extern void FASTCALL(call_rcu_bh(struct rcu_head *head, | |||
285 | extern __deprecated_for_modules void synchronize_kernel(void); | 286 | extern __deprecated_for_modules void synchronize_kernel(void); |
286 | extern void synchronize_rcu(void); | 287 | extern void synchronize_rcu(void); |
287 | void synchronize_idle(void); | 288 | void synchronize_idle(void); |
289 | extern void rcu_barrier(void); | ||
288 | 290 | ||
289 | #endif /* __KERNEL__ */ | 291 | #endif /* __KERNEL__ */ |
290 | #endif /* __LINUX_RCUPDATE_H */ | 292 | #endif /* __LINUX_RCUPDATE_H */ |