Skip to content
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

cpuallocator, plugins: handle priority as an option. #414

Merged
merged 4 commits into from
Nov 19, 2024

Conversation

klihub
Copy link
Collaborator

@klihub klihub commented Nov 17, 2024

Turn priority of CPUs to allocate/release into an opaque option passed to cpuallocator.{Allocate,Release}Cpus(). This should make it much easier to add new options to the allocator in the future.

@klihub klihub force-pushed the devel/cpu-prio-as-option branch 2 times, most recently from 48ab368 to 884af6e Compare November 17, 2024 17:56
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

Copy link
Collaborator

@marquiz marquiz left a comment

Choose a reason for hiding this comment

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

LGTM

Turn priority of CPUs to allocate/release into an opaque
option passed to cpuallocator.{Allocate,Release}Cpus().
This should make it much easier to add new options to the
allocator in the future.

Signed-off-by: Krisztian Litkey <[email protected]>
Allow overriding the default allocation flags using the WithAllocFlags
option.

Signed-off-by: Krisztian Litkey <[email protected]>
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

@askervin
Copy link
Collaborator

@klihub, is this ready for merge, or are you planning to add some more With... options?

@klihub
Copy link
Collaborator Author

klihub commented Nov 19, 2024

@klihub, is this ready for merge, or are you planning to add some more With... options?

@askervin Yes, I have already two in the pipeline stacked on this but I was planning to file those separately and this one just to pave the way for those. One a straightforward WithAllocFlags() to allow overriding the default allocation flags, and another which introduces a new PreferPartialSharedGroups alloc flag to indicate preference to use partially allocated groups instead of always unconditionally slicing up idle ones.

@askervin askervin merged commit a78bf6b into containers:main Nov 19, 2024
3 checks passed
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.

3 participants