All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gary Grebus <Gary.Grebus@oracle.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH 0/2] Fix problems with vbd hotplug on Linux
Date: Mon, 02 Nov 2009 16:35:06 -0500	[thread overview]
Message-ID: <4AEF508A.3090009@oracle.com> (raw)


When many PV domains are started in quick succesion, some domains fail to
start, with xend reporting: "Error: Device nnn (vbd) could not be connected.
Hotplug scripts not working".  The domains used vbd's backed by files.

Multiple instances of the hotplug "add" script were contending on its
lock file.  Some would get delayed so long that the xend DeviceController
would time out, and the domain would fail to start.  Also, the timeout
triggers a hotplug "remove" which could race with the "add", leaving
loopback devices allocated for non-existent domains.  The attached two patches
fix these problems.

Patch 1/2 adds a check that the vbd is still waiting for hotplug
(isn't being closed by xend) before setting up the loopback device.  It
also acquires the the lock file in the remove path to avoid racing with
the add.

Patch 2/2 speeds up finding a free loopback device and determining
if the vbd backing file is being shared with another domain in a compatible
way.  The speedup avoids the lock contention and also reduces the number of
xenstore operations.  In my test it reduced the time needed to start 30
domains by about 35%.

These apply to xen-unstable.

Signed-off-by: Gary Grebus <gary.grebus@oracle.com>

                 reply	other threads:[~2009-11-02 21:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4AEF508A.3090009@oracle.com \
    --to=gary.grebus@oracle.com \
    --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.