-
Notifications
You must be signed in to change notification settings - Fork 161
proxyintegration: Re-implement user-mode NUMA node map #2560
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
Conversation
|
This PR modifies files containing For more on why we check whole files, instead of just diffs, check out the Rustonomicon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors how NUMA node configuration is obtained by moving from a kernel-mode IOCTL approach to accepting the configuration from user-mode VMBus. Instead of the proxy integration calling into the kernel driver to fetch NUMA mappings at runtime, the configuration is now provided upfront through the builder pattern and passed into the ProxyTask.
Key Changes
- The
ProxyIntegrationBuildernow accepts an optional VP-to-physical-node map via a newvp_to_physical_node_map()method - The
VpToPhysicalNodeMapstruct changed from wrappingVec<u8>toOption<Vec<u16>>, with values now being u16 instead of u8 - Removed the kernel-mode IOCTL (
IOCTL_VMBUS_PROXY_GET_NUMA_MAP) and associatedget_numa_node_map()method from theVmbusProxyimplementation
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| vm/devices/vmbus/vmbus_server/src/proxyintegration.rs | Added builder method for NUMA map; changed VpToPhysicalNodeMap to use Option<Vec>; removed IOCTL-based map fetching from proxy_thread; updated field naming from numa_node_map to vp_to_physical_node_map for consistency |
| vm/devices/vmbus/vmbus_proxy/src/proxyioctl.rs | Removed IOCTL constant IOCTL_VMBUS_PROXY_GET_NUMA_MAP and associated struct VMBUS_PROXY_GET_NUMA_MAP_OUTPUT |
| vm/devices/vmbus/vmbus_proxy/src/lib.rs | Removed get_numa_node_map() method and associated imports (headervec, ERROR_MORE_DATA) |
| vm/devices/vmbus/vmbus_proxy/Cargo.toml | Removed headervec dependency which is no longer needed |
| Cargo.lock | Reflects removal of headervec dependency from vmbus_proxy |
SvenGroot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment
| vtl2_hvsock_response_send, | ||
| Arc::clone(&proxy), | ||
| VpToPhysicalNodeMap(vp_to_physical_node_map), | ||
| VpToPhysicalNodeMap(vp_to_physical_node_map.unwrap_or_default()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would propagate this change back, there's no need to use an Option in the builder or anywhere.
41feb3f to
cebbbb6
Compare
We decided adding more kernel mode code wasn't the way to go, so this change delegates fetching the NUMA configuration to user-mode VMBus. Instead of calling a proxy IOCTL on the task start, we now accept a NUMA node map from user-mode VMBus in the proxy builder, which is passed down into the
ProxyTask.