Revision 4f8aa1d8

View differences:

mininet/node.py
674 674
        # Tell mnexec to execute command in our cgroup
675 675
        mncmd = [ 'mnexec', '-g', self.name,
676 676
                  '-da', str( self.pid ) ]
677
        cpuTime = int( self.cgroupGet( 'rt_runtime_us', 'cpu' ) )
678 677
        # if our cgroup is not given any cpu time,
679 678
        # we cannot assign the RR Scheduler.
680
        if self.sched == 'rt' and cpuTime > 0:
681
            mncmd += [ '-r', str( self.rtprio ) ]
682
        elif self.sched == 'rt' and cpuTime <= 0:
683
            debug( '***error: not enough cpu time available for %s.' % self.name,
684
                    'Using cfs scheduler for subprocess\n' )
679
        if self.sched == 'rt':
680
            if int( self.cgroupGet( 'rt_runtime_us', 'cpu' ) ) <= 0:
681
                mncmd += [ '-r', str( self.rtprio ) ]
682
            else:
683
                debug( '*** error: not enough cpu time available for %s.' % self.name,
684
                      'Using cfs scheduler for subprocess\n' )
685 685
        return Host.popen( self, *args, mncmd=mncmd, **kwargs )
686 686

  
687 687
    def cleanup( self ):

Also available in: Unified diff