def create_container_with_mbytes_and_specific_cpus(name, mbytes, cpus=None, root=SUPER_ROOT, io={}, move_in=True, timeout=0):
 need_mem_containers()
 if (not container_exists(root)):
  raise error.AutotestError(('Parent container "%s" does not exist' % root))
 if (cpus is None):
  cpus = get_cpus(root)
 else:
  cpus = set(cpus)
 if (not cpus):
  raise error.AutotestError('Creating container with no cpus')
 name = os.path.join(root, name)
 if os.path.exists(full_path(name)):
  raise error.AutotestError(('Container %s already exists' % name))
 create_container_directly(name, mbytes, cpus)
 set_io_controls(name, **io)
 if move_in:
  move_self_into_container(name)
 return name

def create_container_with_mbytes_and_specific_cpus ( name , mbytes , cpus = None , root = SUPER_ROOT , io = { } , move_in = True , timeout = 0 ) : need_mem_containers ( ) if ( not container_exists ( root ) ) : raise error . AutotestError ( ( 'Parent container "%s" does not exist' % root ) ) if ( cpus is None ) : cpus = get_cpus ( root ) else : cpus = set ( cpus ) if ( not cpus ) : raise error . AutotestError ( 'Creating container with no cpus' ) name = os . path . join ( root , name ) if os . path . exists ( full_path ( name ) ) : raise error . AutotestError ( ( 'Container %s already exists' % name ) ) create_container_directly ( name , mbytes , cpus ) set_io_controls ( name , ** io ) if move_in : move_self_into_container ( name ) return name
create a cpuset container and move jobs current pid into it allocate the list "cpus" of cpus to that container .