Background
Currently, CXL/DAX device detection relies on a timer-based polling mechanism (#48).
This works for the boot-race scenario but has limitations:
- Polling interval introduces unnecessary delay
- No support for runtime device hot-add after initial detection
- No support for device hot-remove (only manual SIGHUP rescan)
Proposal
Replace the polling-based rescan with an event-driven approach using udev kernel event monitoring:
- Monitor CXL subsystem for
dax_region add/remove events via udev netlink
- React immediately when devices become available
- Handle both hot-add and hot-remove at runtime
- Remove the polling loop once the event monitor is in place
Scope
- New
RegionMonitor component (udev-based)
- Adapt
PoolManager to handle dynamic pool add/remove
- Add
libudev-dev build dependency
- Graceful handling of active allocations on device removal
Reference
Background
Currently, CXL/DAX device detection relies on a timer-based polling mechanism (#48).
This works for the boot-race scenario but has limitations:
Proposal
Replace the polling-based rescan with an event-driven approach using udev kernel event monitoring:
dax_regionadd/remove events via udev netlinkScope
RegionMonitorcomponent (udev-based)PoolManagerto handle dynamic pool add/removelibudev-devbuild dependencyReference