diff options
author | Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> | 2008-03-24 15:29:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-24 22:22:19 -0400 |
commit | fd3c36f8b527d13cf311d15e0702bc0390956970 (patch) | |
tree | 7eb9426b914e21e92a7016a54ccc74cc132057ae /kernel/marker.c | |
parent | 5a982cbc7b3fe6cf72266f319286f29963c71b9e (diff) |
markers: update preempt_disable. call_rcu, rcu_barrier comments
Add comments requested by Andrew.
Updated comments about synchronize_sched(). Since we use call_rcu and
rcu_barrier now, these comments were out of sync with the code.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Mike Mason <mmlnx@us.ibm.com>
Cc: Dipankar Sarma <dipankar@in.ibm.com>
Cc: David Smith <dsmith@redhat.com>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Adrian Bunk <adrian.bunk@movial.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/marker.c')
-rw-r--r-- | kernel/marker.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/kernel/marker.c b/kernel/marker.c index 48a4ea5afffd..ccae1d10e32f 100644 --- a/kernel/marker.c +++ b/kernel/marker.c | |||
@@ -104,9 +104,9 @@ void marker_probe_cb(const struct marker *mdata, void *call_private, | |||
104 | char ptype; | 104 | char ptype; |
105 | 105 | ||
106 | /* | 106 | /* |
107 | * disabling preemption to make sure the teardown of the callbacks can | 107 | * preempt_disable does two things : disabling preemption to make sure |
108 | * be done correctly when they are in modules and they insure RCU read | 108 | * the teardown of the callbacks can be done correctly when they are in |
109 | * coherency. | 109 | * modules and they insure RCU read coherency. |
110 | */ | 110 | */ |
111 | preempt_disable(); | 111 | preempt_disable(); |
112 | ptype = ACCESS_ONCE(mdata->ptype); | 112 | ptype = ACCESS_ONCE(mdata->ptype); |
@@ -551,9 +551,9 @@ static int set_marker(struct marker_entry **entry, struct marker *elem, | |||
551 | 551 | ||
552 | /* | 552 | /* |
553 | * Disable a marker and its probe callback. | 553 | * Disable a marker and its probe callback. |
554 | * Note: only after a synchronize_sched() issued after setting elem->call to the | 554 | * Note: only waiting an RCU period after setting elem->call to the empty |
555 | * empty function insures that the original callback is not used anymore. This | 555 | * function insures that the original callback is not used anymore. This insured |
556 | * insured by preemption disabling around the call site. | 556 | * by preempt_disable around the call site. |
557 | */ | 557 | */ |
558 | static void disable_marker(struct marker *elem) | 558 | static void disable_marker(struct marker *elem) |
559 | { | 559 | { |
@@ -565,8 +565,8 @@ static void disable_marker(struct marker *elem) | |||
565 | elem->ptype = 0; /* single probe */ | 565 | elem->ptype = 0; /* single probe */ |
566 | /* | 566 | /* |
567 | * Leave the private data and id there, because removal is racy and | 567 | * Leave the private data and id there, because removal is racy and |
568 | * should be done only after a synchronize_sched(). These are never used | 568 | * should be done only after an RCU period. These are never used until |
569 | * until the next initialization anyway. | 569 | * the next initialization anyway. |
570 | */ | 570 | */ |
571 | } | 571 | } |
572 | 572 | ||
@@ -601,9 +601,6 @@ void marker_update_probe_range(struct marker *begin, | |||
601 | 601 | ||
602 | /* | 602 | /* |
603 | * Update probes, removing the faulty probes. | 603 | * Update probes, removing the faulty probes. |
604 | * Issues a synchronize_sched() when no reference to the module passed | ||
605 | * as parameter is found in the probes so the probe module can be | ||
606 | * safely unloaded from now on. | ||
607 | * | 604 | * |
608 | * Internal callback only changed before the first probe is connected to it. | 605 | * Internal callback only changed before the first probe is connected to it. |
609 | * Single probe private data can only be changed on 0 -> 1 and 2 -> 1 | 606 | * Single probe private data can only be changed on 0 -> 1 and 2 -> 1 |