File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -875,6 +875,13 @@ func (c *criContainer) GetIOPriority() *api.LinuxIOPriority {
875875 return api .FromOCILinuxIOPriority (c .spec .Process .IOPriority )
876876}
877877
878+ func (c * criContainer ) GetScheduler () * api.LinuxScheduler {
879+ if c .spec .Process == nil || c .spec .Process .Scheduler == nil {
880+ return nil
881+ }
882+ return api .FromOCILinuxScheduler (c .spec .Process .Scheduler )
883+ }
884+
878885func (c * criContainer ) GetPid () uint32 {
879886 return c .pid
880887}
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ type LinuxContainer interface {
4646 GetOOMScoreAdj () * int
4747 GetCgroupsPath () string
4848 GetIOPriority () * nri.LinuxIOPriority
49+ GetScheduler () * nri.LinuxScheduler
4950}
5051
5152func commonContainerToNRI (ctr Container ) * nri.Container {
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ func containerToNRI(ctr Container) *nri.Container {
3232 OomScoreAdj : nri .Int (lnxCtr .GetOOMScoreAdj ()),
3333 CgroupsPath : lnxCtr .GetCgroupsPath (),
3434 IoPriority : lnxCtr .GetIOPriority (),
35+ Scheduler : lnxCtr .GetScheduler (),
3536 }
3637 return nriCtr
3738}
You can’t perform that action at this time.
0 commit comments