Skip to content

resource package support pin cpuset#1074

Open
luomingmeng wants to merge 10 commits intokubewharf:mainfrom
luomingmeng:dev/resource-package-support-pin-cpuset
Open

resource package support pin cpuset#1074
luomingmeng wants to merge 10 commits intokubewharf:mainfrom
luomingmeng:dev/resource-package-support-pin-cpuset

Conversation

@luomingmeng
Copy link
Copy Markdown
Collaborator

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Special notes for your reviewer:

@luomingmeng luomingmeng force-pushed the dev/resource-package-support-pin-cpuset branch 7 times, most recently from 566dd0c to b609a22 Compare February 14, 2026 08:10
@luomingmeng luomingmeng force-pushed the dev/resource-package-support-pin-cpuset branch from 8167ee4 to fabdd52 Compare February 14, 2026 11:08
@luomingmeng luomingmeng force-pushed the dev/resource-package-support-pin-cpuset branch 4 times, most recently from c5d3e65 to 5279657 Compare February 24, 2026 11:53
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 71.05518% with 299 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.22%. Comparing base (89bf7a2) to head (f0db5be).
⚠️ Report is 120 commits behind head on main.

Files with missing lines Patch % Lines
...u/assembler/provisionassembler/assembler_common.go 59.77% 121 Missing and 21 partials ⚠️
...ugins/cpu/dynamicpolicy/policy_resource_package.go 79.79% 25 Missing and 14 partials ⚠️
...lugins/cpu/dynamicpolicy/policy_advisor_handler.go 39.21% 26 Missing and 5 partials ⚠️
pkg/agent/qrm-plugins/cpu/dynamicpolicy/policy.go 48.27% 13 Missing and 2 partials ⚠️
...ns/cpu/dynamicpolicy/policy_allocation_handlers.go 79.71% 9 Missing and 5 partials ⚠️
...nt/sysadvisor/plugin/qosaware/server/cpu_server.go 61.11% 9 Missing and 5 partials ⚠️
...sysadvisor/plugin/qosaware/resource/cpu/advisor.go 40.00% 10 Missing and 2 partials ⚠️
...sor/plugin/qosaware/resource/cpu/advisor_helper.go 27.27% 5 Missing and 3 partials ⚠️
cmd/katalyst-agent/app/options/qrm/cpu_plugin.go 28.57% 4 Missing and 1 partial ⚠️
.../qrm-plugins/cpu/dynamicpolicy/policy_irq_tuner.go 60.00% 2 Missing and 2 partials ⚠️
... and 9 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1074      +/-   ##
==========================================
+ Coverage   60.92%   61.22%   +0.29%     
==========================================
  Files         739      744       +5     
  Lines       69777    70475     +698     
==========================================
+ Hits        42512    43147     +635     
- Misses      22489    22509      +20     
- Partials     4776     4819      +43     
Flag Coverage Δ
unittest 61.22% <71.05%> (+0.29%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@luomingmeng luomingmeng force-pushed the dev/resource-package-support-pin-cpuset branch 12 times, most recently from 042ac3a to 6f77250 Compare March 4, 2026 03:56
@luomingmeng luomingmeng force-pushed the dev/resource-package-support-pin-cpuset branch from 6f77250 to bf27756 Compare March 10, 2026 11:55
@luomingmeng luomingmeng force-pushed the dev/resource-package-support-pin-cpuset branch 2 times, most recently from d499595 to 2e422cb Compare March 23, 2026 07:47
…pool to boolean

Update the resource package conversion logic to represent pinned cpuset as a boolean flag instead of a pool name
Modify test cases to reflect the new pinned cpuset representation
- Fix race condition in Start() by properly handling started flag and stop channel
- Replace sleep-based test synchronization with channel signaling
- Ensure cpuPressureEviction only runs when policy is started
…e PinnedCPUSetInfo

- Remove PinnedCPUSetInfo and related fields from QoSRegion interfaces
- Add GetResourcePackageName method to QoSRegion interface
- Introduce ResourcePackageConfig type for storing pinned cpuset info
- Update CPU server to handle resource package config from advisor requests
- Refactor region assembly to use resource package config from metacache
- Simplify region creation by removing pinnedCPUSetInfo parameter
- Add comprehensive tests for resource package config handling
Move zone attribute names used in topology adapter to a centralized consts package
to maintain consistency between CNR producers and consumers. Update all references
to use the new constants from pkg/consts.
…n pools

split the pool allocation logic into separate functions for pinned and common pools
add comprehensive tests for various allocation scenarios
remove redundant pinned CPU set parameter from generatePoolsAndIsolation
…support

Add resource package name handling in region creation and metrics
Modify CPU allocation logic to consider resource package pinned CPUs
… package

Consider resource package when setting origin owner pool name for numa binding containers.
This ensures proper pool name wrapping when a resource package is specified and valid.
…pu allocation logic

remove redundant unwrap operation in GetResourcePackageName and use annotations directly
modify cpu allocation to consider pinned cpusets for better resource isolation
…utes

add attribute selector to filter resource packages for IRQ forbidden CPUs
add helper function to convert CNR attributes to string map
add utility function to aggregate pinned CPU sets from matching resource packages
update IRQ forbidden core logic to include resource package pinned CPUs
add tests for new functionality
@luomingmeng luomingmeng force-pushed the dev/resource-package-support-pin-cpuset branch from 2e422cb to f0db5be Compare March 23, 2026 08:18
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.

1 participant