All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wu Fengguang <fengguang.wu@intel.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>, Avi Kivity <avi@redhat.com>,
	kvm@vger.kernel.org, Lai Jiangshan <laijs@cn.fujitsu.com>,
	Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Nick Piggin <npiggin@suse.de>
Subject: [PATCH] markers: comment usage of marker_synchronize_unregister()
Date: Wed, 26 Nov 2008 20:36:52 +0800	[thread overview]
Message-ID: <20081126123652.GA9446@localhost> (raw)

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()
 

             reply	other threads:[~2008-11-26 12:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-26 12:36 Wu Fengguang [this message]
2008-11-26 12:46 ` [PATCH] markers: comment usage of marker_synchronize_unregister() 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081126123652.GA9446@localhost \
    --to=fengguang.wu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=mingo@elte.hu \
    --cc=npiggin@suse.de \
    --cc=paulmck@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.