Don't check rt_runtime_us for CFS scheduler

This commit is contained in:
Bob Lantz
2014-11-05 16:49:28 -08:00
parent 060d46a282
commit 4f8aa1d8a0
+4 -4
View File
@@ -674,13 +674,13 @@ class CPULimitedHost( Host ):
# Tell mnexec to execute command in our cgroup
mncmd = [ 'mnexec', '-g', self.name,
'-da', str( self.pid ) ]
cpuTime = int( self.cgroupGet( 'rt_runtime_us', 'cpu' ) )
# if our cgroup is not given any cpu time,
# we cannot assign the RR Scheduler.
if self.sched == 'rt' and cpuTime > 0:
if self.sched == 'rt':
if int( self.cgroupGet( 'rt_runtime_us', 'cpu' ) ) <= 0:
mncmd += [ '-r', str( self.rtprio ) ]
elif self.sched == 'rt' and cpuTime <= 0:
debug( '***error: not enough cpu time available for %s.' % self.name,
else:
debug( '*** error: not enough cpu time available for %s.' % self.name,
'Using cfs scheduler for subprocess\n' )
return Host.popen( self, *args, mncmd=mncmd, **kwargs )