[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 0/2] Fix problems with vbd hotplug on Linux



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@xxxxxxxxxx>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.