Hi!

To make my test run on systems where cgroups have already been mounted 
to some location, becoming a bit tricky. I need to calc which of 
subsystems combinations already used to mount cgroups, and mount it in 
the same way, but subsys which are not mounted don't have such 
restriction. For example, I have a machine where cgroups (cpu, cpuset) 
are mounted to /sys/fs/cgroup. After that I can only mount (to other 
directory) cgroups with options "cpu,cpuset" and all other combinations 
except ones which include "cpu" or "cpuset". If I try to mount only cpu, 
it will come with EBUSY error.

Also, there is another issue: if, for instance, assume that somewhere in 
the system "cpuset" (or any) subsystem mounted without "xattr" option. 
Then, my test decided to mount it in the same way but with additional 
option "xattr". And it will be successfully mounted (return code is 0). 
But it's not possible to set any xattr to cgroups files in that new 
mounted subsystem, the error: operation is not supported. At least I 
expect that mount should be denied with EBUSY or xattr could be set as 
usual. This issue was reported to cgroups author, and may be he will fix 
it soon.

I can see only one workaround:
mount should be made to subsystems which are not mounted!

When fix is committed, the workaround can be removed.

Thanks,
Alexey

On 05/23/2013 06:24 PM, [email protected] wrote:
> Hi!
> On 05/23/2013 05:31 PM, [email protected] wrote:
>> Hi!
>>> Support of extended attributes in cgroups was added in Linux 3.7.
>> I've tried to run the test on my machine where cgroups are allready
>> mounted to /sys/fs/cgroup (which seems to be the case for modern
>> distributions). In such situation the mount in the test fails with
>> EBUSY. I looks like the root hierarchy can be mounted only once. Now we
>> cannot unmout the /sys/fs/cgroup as this one is used by the system.
>>
>> But it looks like we can mount each of the controllers, i.e.
>>
>> for each controller:
>>     mkdir /path/type
>>     mount -t cgroup -o type type /path/type
>>
>> So the options are either to use the /sys/fs/cgroup directory or mount
>> each controller one by one.
>>
>> What do you think?
>>
> it appears in case you already mounted cgroups with only a few 
> subsystems (using -o type1, ...) and want to mount somewhere all 
> available subsystems without specifying ones.
>
> Yes, it's solving by mounting subsystems using -o type1, type2,... and 
> we can specify all, it will be ok!
>
> but it doesn't work in case all available sybsystems has been already 
> mounted (without options) before and we will get the same busy error.
>
> It seems that each way of mounting should coincide with previous. So 
> one possible way out is detect how many subsystems was already mounted 
> and mount accordingly.
> Any ideas?
>
>
>
>
>

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to