Skip to content

refactor: qrm allocation hooks - #6

Open
luomingmeng wants to merge 5 commits into
feat/qrm-cpu-numa-rp-optimizationfrom
refactor/qrm-allocation-hooks
Open

refactor: qrm allocation hooks#6
luomingmeng wants to merge 5 commits into
feat/qrm-cpu-numa-rp-optimizationfrom
refactor/qrm-allocation-hooks

Conversation

@luomingmeng

Copy link
Copy Markdown
Owner

What type of PR is this?

Features/Refactor/Bug fixes

What this PR does / why we need it:

  • Fixes memory NUMA binding validation for shared cores
  • Introduces allocation hooks framework for CPU dynamic policy
  • Renames IsInMemoryStore to EnableInMemoryState in QRM base configuration for better semantics
  • Enhances utility functions for resource extraction from pod annotations
  • Integrates allocation hooks into both CPU and Memory DynamicPolicy
  • Adds topology assignments support in allocation responses
  • Improves memory advisor handler split for non-Linux platforms
  • Fixes deadlocks and adds comprehensive tests for hooks

Which issue(s) this PR fixes:

Special notes for your reviewer:

@luomingmeng luomingmeng changed the title Refactor/qrm allocation hooks refactor: qrm allocation hooks May 14, 2026
@luomingmeng
luomingmeng force-pushed the feat/qrm-cpu-numa-rp-optimization branch from 4bd5500 to b9f496a Compare May 16, 2026 03:29
@luomingmeng
luomingmeng force-pushed the refactor/qrm-allocation-hooks branch from 5518efd to f8b2d29 Compare May 16, 2026 03:30
@luomingmeng
luomingmeng force-pushed the feat/qrm-cpu-numa-rp-optimization branch from b9f496a to 648d437 Compare May 17, 2026 09:15
@luomingmeng
luomingmeng force-pushed the refactor/qrm-allocation-hooks branch from f8b2d29 to 5b1efc7 Compare May 17, 2026 09:16
@luomingmeng
luomingmeng force-pushed the feat/qrm-cpu-numa-rp-optimization branch from 648d437 to 2364f22 Compare May 20, 2026 07:36
@luomingmeng
luomingmeng force-pushed the feat/qrm-cpu-numa-rp-optimization branch from 2364f22 to 8902882 Compare May 27, 2026 09:18
@luomingmeng
luomingmeng force-pushed the refactor/qrm-allocation-hooks branch from 5b1efc7 to bb15966 Compare May 27, 2026 09:58
@luomingmeng
luomingmeng force-pushed the feat/qrm-cpu-numa-rp-optimization branch from 8902882 to f9a392b Compare May 29, 2026 14:47
@luomingmeng
luomingmeng force-pushed the refactor/qrm-allocation-hooks branch from bb15966 to ee8d9f9 Compare May 29, 2026 14:49
@luomingmeng
luomingmeng force-pushed the feat/qrm-cpu-numa-rp-optimization branch 2 times, most recently from 874dc7a to 0cd2f66 Compare June 3, 2026 05:40
@luomingmeng
luomingmeng force-pushed the refactor/qrm-allocation-hooks branch 2 times, most recently from 86fe96c to 8b4290e Compare June 3, 2026 06:30
luomingmeng and others added 5 commits June 3, 2026 14:44
…rp-optimization

feat: qrm cpu numa rp optimization
- Add pre-update validation hooks for CPU allocation.
- Modify updateAllocationInfo to accept old allocation info so hooks can observe the prior state.
…configuration

- Add ExportedAllocationInfoAnnotationKeys field to GenericQRMPluginOptions and GenericQRMPluginConfiguration to support filtering annotations in allocation responses.
- Rename IsInMemoryStore to EnableInMemoryState in GenericQRMPluginConfiguration to align with naming conventions and clarify its purpose.
- Update NewGenericQRMPluginOptions and ApplyTo methods to handle the new configuration field.
… annotations

- Add GetPodAggregatedRequestResourceByAnnotations to provide flexible resource request extraction from pod annotations with fallback support.
- Add GetExportedAllocationInfoAnnotationKeys and GetExportedAnnotations to filter and extract specific annotations from AllocationInfo for ResourceAllocationResponse.
- Refactor GetPodAggregatedRequestResource to utilize the new annotation-based extraction logic.
- Add comprehensive unit tests for the new utility functions in util_test.go.
- Integrate allocation hooks in CPU DynamicPolicy, updating PackAllocationResponse and GetCPUTopologyAllocationsAnnotations.
- Integrate allocation hooks in Memory DynamicPolicy, introducing getPackAllocationResponse.
- Fix potential deadlock issues by removing redundant locks.
- Add memory-specific annotation helpers and update unit tests.
@luomingmeng
luomingmeng force-pushed the refactor/qrm-allocation-hooks branch from 8b4290e to 071ab58 Compare June 3, 2026 06:46
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.

2 participants