Fix problems with vbd hotplug on Linux
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | Fix problems with vbd hotplug on Linuxtools/ | +11 | 0 replies | |
| 2/2 | Fix problems with vbd hotplug on Linuxtools/ | +14 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [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.