Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up/usr/lib/qubes/udev-block-add-change calling xenstore-ls is way too slow #3291
Comments
qubesuser
referenced this issue
in QubesOS/qubes-linux-utils
Nov 8, 2017
Merged
Speed up udev-block-add-change by not using xenstore #24
andrewdavidwong
added
C: core
enhancement
labels
Nov 8, 2017
andrewdavidwong
added this to the Release 4.0 milestone
Nov 8, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
PR proposed by @qubesuser makes it good enough. |
marmarek
closed this
Dec 22, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
qubesuser commentedNov 8, 2017
•
edited
Edited 2 times
-
qubesuser
edited Nov 8, 2017 (most recent)
-
qubesuser
edited Nov 8, 2017
Qubes OS version:
R4.0-rc2
Steps to reproduce the behavior:
Expected behavior:
xenstored and xenstore-ls do not appear in "top"
Actual behavior:
xenstored is at 100% time for several seconds in qvm-create and potentially minutes in udevadm trigger with multiple xenstore-ls running and taking a lot of CPU time.
General notes:
xenstore-ls is just too inefficient to call from /usr/lib/qubes/udev-block-add-change
It needs to be replaced with a much faster way to tell if a device is attached, or an algorithm change that doesn't require to determine whether devices are attached at this point.
Proposed optimization at QubesOS/qubes-linux-utils#24 . While that pull request should make it much faster, it still requires an O(n) scan, making "udevadm trigger" O(n^2), which is not good.