Skip to content

Conversation

@klihub
Copy link
Collaborator

@klihub klihub commented Feb 3, 2026

Notes: This PR is stacked on top of #618.

This patch series implements initial scheduling class support for the topology-aware policy. In particular, the PR

  • adds known scheduling classes to the topology aware configuration
  • defines a new annotation key for annotating containers or pods to a scheduling class
  • implements assigning Guaranteed QoS class containers with exclusive CPU allocation to annotated classes
  • adds test cases for scheduling class assignment
  • documents the current level of support for scheduling classes

askervin and others added 9 commits January 30, 2026 15:20
Add support for declaring known scheduling classes for the topology-
aware policy. A scheduling class is a combination of Linux schduler
policy and I/O priority parameters. It is represented using the same
policy-agnostic data structure as used by the balloons policy.

Signed-off-by: Krisztian Litkey <[email protected]>
Implement support for annotated assignment of containers to scheduling
classes.

Signed-off-by: Krisztian Litkey <[email protected]>
@klihub klihub force-pushed the devel/topology-aware/scheduling-classes branch from 091fe49 to be49f4e Compare February 3, 2026 13:45
@klihub klihub changed the title topology-aware: implement scheduling-class support. topology-aware: initial scheduling class support. Feb 3, 2026
to ionice(1) documentation for valid values.
These attributes are applied to containers which get assigned to the
class. Use the `scheduling-class.resource-policy.nri.io` annotation
key to annotate a pod or a container to a class. Currently scheduling
Copy link
Collaborator

Choose a reason for hiding this comment

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

Including Burstable and BestEffort containers could have additional benefits.

Guaranteed containers with exclusive CPUs have no kernel scheduling level competition on using CPU time, so they probably benefit most from I/O priority and realtime scheduling policy for faster wakeups.

On the other hand, separate scheduling classes would help prioritizing a responsive (online request-handling) Burstable container over an offline AI-agent Burstable, that would be fine using idle CPU cycles. Because these Burstables may run using the same CPU pool, scheduling policy and priority makes a difference.

if sc := p.getSchedulingClass(name); sc == nil {
log.Errorf("%s: unknown scheduling class %q", container.PrettyName(), name)
} else {
if grant.SharedPortion() > 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

...as in previous comment, I might have applied annotated scheduling class without any hesitation. But that's because I'm always eager giving a gun to the user who asks it, not because it would necessarily be wise. You probably have good reasons, like we don't want realtime BestEffort workloads to eat all available CPUs...

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.

Looks very good to me. I trust your judgement in the only thing that I noticed and raised reviewing this.

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