Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338796
b: refs/heads/master
c: 57d34a6
h: refs/heads/master
v: v3
  • Loading branch information
Kees Cook authored and Paul E. McKenney committed Nov 8, 2012
1 parent 6ff7d22 commit 32a5a40
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0f9574d83234274c4d8f8f742b45022e5718b16e
refs/heads/master: 57d34a6cee1399bfedaa73add1915951cbe75cab
2 changes: 1 addition & 1 deletion trunk/Documentation/RCU/listRCU.txt
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ RCU ("read-copy update") its name. The RCU code is as follows:
audit_copy_rule(&ne->rule, &e->rule);
ne->rule.action = newaction;
ne->rule.file_count = newfield_count;
list_replace_rcu(e, ne);
list_replace_rcu(&e->list, &ne->list);
call_rcu(&e->rcu, audit_free_rule);
return 0;
}
Expand Down
13 changes: 11 additions & 2 deletions trunk/Documentation/RCU/whatisRCU.txt
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,8 @@ The foo_reclaim() function might appear as follows:
{
struct foo *fp = container_of(rp, struct foo, rcu);

foo_cleanup(fp->a);

kfree(fp);
}

Expand All @@ -521,6 +523,12 @@ o Use call_rcu() -after- removing a data element from an
read-side critical sections that might be referencing that
data item.

If the callback for call_rcu() is not doing anything more than calling
kfree() on the structure, you can use kfree_rcu() instead of call_rcu()
to avoid having to write your own callback:

kfree_rcu(old_fp, rcu);

Again, see checklist.txt for additional rules governing the use of RCU.


Expand Down Expand Up @@ -773,8 +781,8 @@ a single atomic update, converting to RCU will require special care.

Also, the presence of synchronize_rcu() means that the RCU version of
delete() can now block. If this is a problem, there is a callback-based
mechanism that never blocks, namely call_rcu(), that can be used in
place of synchronize_rcu().
mechanism that never blocks, namely call_rcu() or kfree_rcu(), that can
be used in place of synchronize_rcu().


7. FULL LIST OF RCU APIs
Expand Down Expand Up @@ -813,6 +821,7 @@ RCU: Critical sections Grace period Barrier
rcu_read_unlock synchronize_rcu
rcu_dereference synchronize_rcu_expedited
call_rcu
kfree_rcu


bh: Critical sections Grace period Barrier
Expand Down

0 comments on commit 32a5a40

Please sign in to comment.