All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix problems with vbd hotplug on Linux
@ 2009-11-02 21:35 Gary Grebus
  0 siblings, 0 replies; only message in thread
From: Gary Grebus @ 2009-11-02 21:35 UTC (permalink / raw)
  To: xen-devel


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>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-02 21:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-02 21:35 [PATCH 0/2] Fix problems with vbd hotplug on Linux Gary Grebus

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.