Add default value mems=0 for memory placement.
This commit is contained in:
+2
-2
@@ -621,7 +621,7 @@ class CPULimitedHost( Host ):
|
|||||||
self.chrt( prio=20 )
|
self.chrt( prio=20 )
|
||||||
info( '(%s %d/%dus) ' % ( sched, quota, period ) )
|
info( '(%s %d/%dus) ' % ( sched, quota, period ) )
|
||||||
|
|
||||||
def setCPUs( self, cores ):
|
def setCPUs( self, cores, mems=0 ):
|
||||||
"Specify (real) cores that our cgroup can run on"
|
"Specify (real) cores that our cgroup can run on"
|
||||||
if type( cores ) is list:
|
if type( cores ) is list:
|
||||||
cores = ','.join( [ str( c ) for c in cores ] )
|
cores = ','.join( [ str( c ) for c in cores ] )
|
||||||
@@ -630,7 +630,7 @@ class CPULimitedHost( Host ):
|
|||||||
# Memory placement is probably not relevant, but we
|
# Memory placement is probably not relevant, but we
|
||||||
# must specify it anyway
|
# must specify it anyway
|
||||||
self.cgroupSet( resource='cpuset', param='mems',
|
self.cgroupSet( resource='cpuset', param='mems',
|
||||||
value= cores )
|
value=mems)
|
||||||
# We have to do this here after we've specified
|
# We have to do this here after we've specified
|
||||||
# cpus and mems
|
# cpus and mems
|
||||||
errFail( 'cgclassify -g cpuset:/%s %s' % (
|
errFail( 'cgclassify -g cpuset:/%s %s' % (
|
||||||
|
|||||||
Reference in New Issue
Block a user