From: Anthony Liguori <aliguori@us.ibm.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Dan Smith <danms@us.ibm.com>, xen-devel@lists.xensource.com
Subject: Re: [PATCH] Convert shutdown to use xenstore
Date: Thu, 04 Aug 2005 21:18:51 -0500 [thread overview]
Message-ID: <42F2CC8B.1070400@us.ibm.com> (raw)
In-Reply-To: <1123207790.10802.62.camel@localhost.localdomain>
Rusty Russell wrote:
>/* Only required if your code runs in dom0 as well as domU */
>static int register_xenstore_notifier(struct notifier_block *notifier)
>{
> int ret = 0;
>
> down(&xenbus_lock);
> if (xen_start_info.evtchn)
> ret = notifier.notifier_call(notifier, 0, NULL);
> else
> notifier_chain_register(&xenstore_chain, nb);
> up(&xenbus_lock);
> return ret;
>}
>
>
I like this. It avoids having special case code for dom0 in all the
drivers.
>Implementation detail: just use the xenbus_lock rather than another
>lock, and make sure you hold it while traversing, not just registering!
>
>
I was following kernel/cpu.c:cpu_down(). Definitely makes sense though.
Regards,
Anthony Liguori
>Rusty.
>
>
next prev parent reply other threads:[~2005-08-05 2:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-04 15:35 [PATCH] Convert shutdown to use xenstore Dan Smith
2005-08-05 1:58 ` Mark Williamson
2005-08-05 2:48 ` Rusty Russell
2005-08-05 2:09 ` Rusty Russell
2005-08-05 2:18 ` Anthony Liguori [this message]
2005-08-05 8:58 ` Keir Fraser
2005-08-05 3:58 ` aq
2005-08-05 4:06 ` Dan Smith
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=42F2CC8B.1070400@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=danms@us.ibm.com \
--cc=rusty@rustcorp.com.au \
--cc=xen-devel@lists.xensource.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.