All of lore.kernel.org
 help / color / mirror / Atom feed
* xenstore notifier: atomic or blocking?
@ 2007-10-18  8:51 Jan Beulich
  2007-10-18  8:55 ` Keir Fraser
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2007-10-18  8:51 UTC (permalink / raw)
  To: xen-devel

Is there any reason why this notifier is atomic rather than blocking? 2.6.23
has it as a blocking one, and judging from its use this is the right thing to do.

Thanks, Jan

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

* Re: xenstore notifier: atomic or blocking?
  2007-10-18  8:51 xenstore notifier: atomic or blocking? Jan Beulich
@ 2007-10-18  8:55 ` Keir Fraser
  2007-10-26 15:47   ` [PATCH] " Jan Beulich
  0 siblings, 1 reply; 3+ messages in thread
From: Keir Fraser @ 2007-10-18  8:55 UTC (permalink / raw)
  To: Jan Beulich, xen-devel

I expect the atomic one looked safer. :-) Feel free to send a patch.

 -- Keir

On 18/10/07 09:51, "Jan Beulich" <jbeulich@novell.com> wrote:

> Is there any reason why this notifier is atomic rather than blocking? 2.6.23
> has it as a blocking one, and judging from its use this is the right thing to
> do.
> 
> Thanks, Jan
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

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

* [PATCH] Re: xenstore notifier: atomic or blocking?
  2007-10-18  8:55 ` Keir Fraser
@ 2007-10-26 15:47   ` Jan Beulich
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2007-10-26 15:47 UTC (permalink / raw)
  To: Keir Fraser, xen-devel

There doesn't appear to be any need for it to be atomic.

As usual, written and tested against 2.6.23 and made apply against
2.6.18 without further testing.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

Index: head-2007-10-23/drivers/xen/xenbus/xenbus_probe.c
===================================================================
--- head-2007-10-23.orig/drivers/xen/xenbus/xenbus_probe.c	2007-10-25 15:08:03.000000000 +0200
+++ head-2007-10-23/drivers/xen/xenbus/xenbus_probe.c	2007-10-25 15:08:43.000000000 +0200
@@ -69,7 +69,7 @@ static unsigned long xen_store_mfn;
 
 extern struct mutex xenwatch_mutex;
 
-static ATOMIC_NOTIFIER_HEAD(xenstore_chain);
+static BLOCKING_NOTIFIER_HEAD(xenstore_chain);
 
 static void wait_for_devices(struct xenbus_driver *xendrv);
 
@@ -832,7 +832,7 @@ int register_xenstore_notifier(struct no
 	if (xenstored_ready > 0)
 		ret = nb->notifier_call(nb, 0, NULL);
 	else
-		atomic_notifier_chain_register(&xenstore_chain, nb);
+		blocking_notifier_chain_register(&xenstore_chain, nb);
 
 	return ret;
 }
@@ -840,7 +840,7 @@ EXPORT_SYMBOL_GPL(register_xenstore_noti
 
 void unregister_xenstore_notifier(struct notifier_block *nb)
 {
-	atomic_notifier_chain_unregister(&xenstore_chain, nb);
+	blocking_notifier_chain_unregister(&xenstore_chain, nb);
 }
 EXPORT_SYMBOL_GPL(unregister_xenstore_notifier);
 
@@ -855,7 +855,7 @@ void xenbus_probe(struct work_struct *un
 	xenbus_backend_probe_and_watch();
 
 	/* Notify others that xenstore is up */
-	atomic_notifier_call_chain(&xenstore_chain, 0, NULL);
+	blocking_notifier_call_chain(&xenstore_chain, 0, NULL);
 }
 
 

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

end of thread, other threads:[~2007-10-26 15:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-18  8:51 xenstore notifier: atomic or blocking? Jan Beulich
2007-10-18  8:55 ` Keir Fraser
2007-10-26 15:47   ` [PATCH] " Jan Beulich

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.