[PATCH 6/7] [RFC] Support multiply-bindable cgroup subsystems

Li Zefan lizf at cn.fujitsu.com
Tue Mar 17 19:09:47 PDT 2009


>>  			cgrp->subsys[i] = NULL;
>>  			root->subsys_bits &= ~bit;
>> -			rootnode.subsys_bits |= bit;
>> +			if (singleton)
>> +				rootnode.subsys_bits |= bit;
> 
> initially we can see all subsystems in /proc/cgroups, but:
> 

Ah, I just notice debug_subsys will never be in rootnode. But this is a bit odd,
and one of the use of /proc/cgroups is to check if a subsystem is supported or
not, so we can no longer do this:
	#! /bin/sh
	grep -q debug /proc/cgroups
	if [ $? -ne 0 ]; then
		echo "debug subsystem is not compiled into kernel"
		exit 1
	fi
	# mount debug_subsys and do something with it...



More information about the Containers mailing list