public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] markers: comment usage of marker_synchronize_unregister()
@ 2008-11-26 12:36 Wu Fengguang
  2008-11-26 12:46 ` Mathieu Desnoyers
  0 siblings, 1 reply; 10+ messages in thread
From: Wu Fengguang @ 2008-11-26 12:36 UTC (permalink / raw)
  To: LKML
  Cc: Ingo Molnar, Avi Kivity, kvm, Lai Jiangshan, Mathieu Desnoyers,
	Paul E. McKenney, Andrew Morton, Nick Piggin

Add more comments to marker_synchronize_unregister() in order to
reduce the chance of misusing.

Based on comments from Lai Jiangshan <laijs@cn.fujitsu.com>.

Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
---

I'm still not sure about the last sentence. Can anyone clarify on
this? Thanks!

diff --git a/include/linux/marker.h b/include/linux/marker.h
index 889196c..89ce1b8 100644
--- a/include/linux/marker.h
+++ b/include/linux/marker.h
@@ -164,6 +164,12 @@ extern void *marker_get_private_data(const char *name, marker_probe_func *probe,
  * marker_synchronize_unregister must be called between the last marker probe
  * unregistration and the end of module exit to make sure there is no caller
  * executing a probe when it is freed.
+ *
+ * It must be called _also_ between unregistration and destruction the data
+ * that unregistration-ed probes need to make sure there is no caller executing
+ * a probe when it's data is destroyed.
+ *
+ * It works reliably only when all probe routines do not sleep and reschedule.
  */
 #define marker_synchronize_unregister() synchronize_sched()
 

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-11-28 15:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-26 12:36 [PATCH] markers: comment usage of marker_synchronize_unregister() Wu Fengguang
2008-11-26 12:46 ` Mathieu Desnoyers
2008-11-26 13:08   ` Wu Fengguang
2008-11-27  1:05     ` [PATCH] markers: comment marker_synchronize_unregister() on data dependency Wu Fengguang
2008-11-27  1:23       ` Lai Jiangshan
2008-11-27  1:36         ` Wu Fengguang
2008-11-27  8:00           ` Mathieu Desnoyers
2008-11-27  8:14             ` Wu Fengguang
2008-11-27 18:44               ` Mathieu Desnoyers
2008-11-28 15:47                 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox