All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com, Christian.Limpach@cl.cam.ac.uk
Subject: Re: /proc/xen/xenbus supports watch?
Date: Tue, 20 Sep 2005 21:01:04 +1000	[thread overview]
Message-ID: <1127214064.2656.45.camel@localhost.localdomain> (raw)
In-Reply-To: <d7335251fd831e43f944d94e22da3878@cl.cam.ac.uk>

On Mon, 2005-09-19 at 09:54 +0100, Keir Fraser wrote:
> I wholeheartedly agree that restore should be equivalent to xenstored 
> restart from the p.o.v. of the xenbus driver. That's how the block qnde 
> net drivers already work. But it's orthogonal to whether we mux 
> connections onto a single transport page.

OK, that's a little confusing.  There are three ways to talk to
xenstored (dom0, domU kernel, domU userspace), and two comms problems
(xenstored restart, and migration).

1) For domU kernels, we have a shared page, so xenstored restarts are
completely transparent to the domains: the new xenstored just maps the
page and away we go.  We also hold the xenstore_lock across entire
transactions, which is grabbed on save/restore, so we trivially avoid
any sync issues on migration.

2) When dom0 tools connect to xenstored, they use a socket, which
there's no easy way for the new xenstored to pick up (eg. you write to
the socket just as the daemon shuts down...).  The idea, then, is to
handle reconnecting in libxenstore itself.  The recent protocol tweaks
are designed to make this trivial.  There's no migration of dom0 tools
to worry about.

3) The new problem is domU tools.  By providing a kernel device node we
make it look exactly like talking through a socket, so libxenstore is
basically unchanged.  By each open using a separate page to talk to
xenstored, we don't have to hold the kernel lock, nor worry about tool
errors/crashes screwing the kernel's store page.  xenstored restarts are
transparent.  On migration, we can simply force close (unmap page,
return EBADF), which libxestore can treat exactly like the xenstored
restart case with sockets, reconnect and re-xmit.

The only issue is that, in the case of migration, the new xenstored
won't know about any transaction currently in progress.  We can either
migration transactions (easy for clients), or return EAGAIN for the next
operation (easy for xenstored, sucks for clients).  

Cheers,
Rusty.
-- 
A bad analogy is like a leaky screwdriver -- Richard Braakman

  reply	other threads:[~2005-09-20 11:01 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-08  8:02 /proc/xen/xenbus supports watch? NAHieu
2005-09-08 10:38 ` Christian Limpach
2005-09-09  0:43   ` Rusty Russell
2005-09-13  9:42     ` Christian Limpach
2005-09-14  0:21       ` Rusty Russell
2005-09-14  8:24         ` Christian Limpach
2005-09-14  9:18         ` Rusty Russell
2005-09-14 12:55           ` Christian Limpach
2005-09-15  1:39             ` Rusty Russell
2005-09-15 10:53               ` Keir Fraser
2005-09-17  8:26                 ` Rusty Russell
2005-09-17  8:33                   ` Keir Fraser
2005-09-19  0:11                     ` Rusty Russell
2005-09-19  8:54                       ` Keir Fraser
2005-09-20 11:01                         ` Rusty Russell [this message]
2005-09-21  9:35                           ` Keir Fraser
2005-09-22  2:07                             ` Rusty Russell
2005-09-22  9:36                               ` Keir Fraser
2005-09-22 22:54                                 ` Rusty Russell
2005-09-23  9:17                                   ` Keir Fraser
2005-09-25  3:29                                     ` Rusty Russell
2005-09-25 11:02                                       ` Keir Fraser
2005-09-25 11:33                                         ` Keir Fraser
2005-09-25 18:55                                           ` Christian Limpach
2005-09-26  6:36                                             ` Rusty Russell
2005-09-26  7:33                                               ` Keir Fraser
2005-09-26 18:51                                               ` Christian Limpach
2005-09-26 19:30                                                 ` Keir Fraser
2005-09-27  6:48                                                   ` Rusty Russell
2005-09-27  7:15                                                 ` Rusty Russell
2005-09-27 23:31                                                   ` David Hopwood
2005-09-25 23:06                                           ` Rusty Russell
2005-09-21  9:39                           ` Keir Fraser
2005-09-21 11:42                             ` harry
2005-09-22  2:22                             ` Rusty Russell
2005-09-22  9:35                               ` Keir Fraser
2005-09-22 23:51                                 ` Rusty Russell
2005-09-23  1:01                                   ` Andrew Warfield
2005-09-25  0:57                                     ` Rusty Russell
2005-09-25 11:09                                       ` Keir Fraser
2005-09-25 22:52                                         ` Rusty Russell
2005-09-23  9:24                                   ` Keir Fraser
2005-09-25  1:09                                     ` Rusty Russell
2005-09-17 17:40                   ` Christian Limpach
2005-09-19  0:19                     ` Rusty Russell
2005-09-15 11:02               ` Christian Limpach

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=1127214064.2656.45.camel@localhost.localdomain \
    --to=rusty@rustcorp.com.au \
    --cc=Christian.Limpach@cl.cam.ac.uk \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --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.