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
+3 -3
View File
@@ -674,12 +674,12 @@ class CPULimitedHost( Host ):
# Tell mnexec to execute command in our cgroup # Tell mnexec to execute command in our cgroup
mncmd = [ 'mnexec', '-g', self.name, mncmd = [ 'mnexec', '-g', self.name,
'-da', str( self.pid ) ] '-da', str( self.pid ) ]
cpuTime = int( self.cgroupGet( 'rt_runtime_us', 'cpu' ) )
# if our cgroup is not given any cpu time, # if our cgroup is not given any cpu time,
# we cannot assign the RR Scheduler. # 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 ) ] mncmd += [ '-r', str( self.rtprio ) ]
elif self.sched == 'rt' and cpuTime <= 0: else:
debug( '*** error: not enough cpu time available for %s.' % self.name, debug( '*** error: not enough cpu time available for %s.' % self.name,
'Using cfs scheduler for subprocess\n' ) 'Using cfs scheduler for subprocess\n' )
return Host.popen( self, *args, mncmd=mncmd, **kwargs ) return Host.popen( self, *args, mncmd=mncmd, **kwargs )