Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimize xenstore accesses during domid-to-uuid lookups #6129

Conversation

last-genius
Copy link
Contributor

@last-genius last-genius commented Nov 20, 2024

Bake in assumptions that have been constant ever since xenstore was created: getdomainpath always returns "/local/domain/domid", /local/domain/domid/vm returns "/vm/uuid", so there's no need to look up that path to get the uuid again

This reduces the number of xenstore accesses from 3 to 1 with no functional change.

As suggested in: #6068 (review)

Bake in assumptions that have been constant ever since xenstore was created:
getdomainpath always returns "/local/domain/<domid>", /local/domain/domid/vm
returns "/vm/<uuid>", so there's no need to look up that path to get the uuid
again

This reduces the number of xenstore accesses from 3 to 1 with no functional
change.

As suggested in: xapi-project#6068 (review)

Signed-off-by: Andrii Sultanov <[email protected]>
@last-genius last-genius force-pushed the private/asultanov/rrdd-xenctrl-fix branch from a126f22 to 21d6773 Compare November 20, 2024 09:44
|> String.split_on_char '/'
in
match vm_uuid_path with
| [_; _; uuid] ->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking....

utop # String.split_on_char '/' "/vm/67c0a36c-be5f-b3b3-8652-ff17a974ae2a";;
- : string list = [""; "vm"; "67c0a36c-be5f-b3b3-8652-ff17a974ae2a"]

@last-genius last-genius added this pull request to the merge queue Nov 26, 2024
Merged via the queue into xapi-project:master with commit 536db8c Nov 26, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants