containers / nri-plugins

A collection of community maintained NRI plugins
https://containers.github.io/nri-plugins/
Apache License 2.0
67 stars 24 forks source link

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

Closed klihub closed 2 weeks ago

klihub commented 2 weeks ago

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.

askervin commented 2 weeks ago

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

klihub commented 2 weeks ago

@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.