Skip to content

Conversation

@klihub
Copy link
Collaborator

@klihub klihub commented Dec 2, 2025

This PR updates the topology-aware policy CPU accounting and allocation algorithm, to

  • account for best-effort and zero-cp-request burstable containers assigned to shared pools
  • prevent the policy from slicing a shared CPU pool empty if it is busy

A shared pool is considered busy if it has at least one best-effort or zero-cpu-req. burstable container assigned to it or any of its children.

@klihub klihub requested a review from askervin December 2, 2025 13:09
@klihub klihub force-pushed the fixes/dont-slice-busy-pools-empty branch from 97d4ca0 to 9cdd695 Compare December 2, 2025 15:00
@klihub klihub requested a review from fmuyassarov December 2, 2025 15:00
@klihub klihub force-pushed the fixes/dont-slice-busy-pools-empty branch 2 times, most recently from ee614f0 to 8e7b615 Compare December 2, 2025 18:03
klihub and others added 3 commits December 3, 2025 11:17
Update allocation to account an extra milliCPU capacity if a node
has BestEffort containers assigned to the shared pool of the node
or any of its children. When slicing exclusive CPUs from a shared
pool, make sure we don't slice any of the busy shared pools empty.

Signed-off-by: Krisztian Litkey <[email protected]>
Add a test case from Antti Kervinen <[email protected]>
for testing that busy shared CPU pools are not sliced empty.

Co-authored-by: Antti Kervinen <[email protected]>
Signed-off-by: Krisztian Litkey <[email protected]>
@klihub klihub force-pushed the fixes/dont-slice-busy-pools-empty branch from 8e7b615 to ca9beb1 Compare December 3, 2025 09:30
@klihub klihub requested a review from askervin December 3, 2025 09:41
@klihub klihub marked this pull request as ready for review December 3, 2025 10:14
Copy link
Collaborator

@askervin askervin left a comment

Choose a reason for hiding this comment

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

LGTM, huge thanks for quick yet very very much nontrivial fix, @klihub!

@askervin askervin merged commit 1e4e00a into containers:main Dec 12, 2025
9 checks passed
@klihub klihub deleted the fixes/dont-slice-busy-pools-empty branch December 16, 2025 11:15
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