public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: handai handai <handai.szj@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [Fwd: Re: cgroup umount bug]
Date: Tue, 11 Oct 2011 11:02:38 +0800	[thread overview]
Message-ID: <4E93B1CE.4070908@cn.fujitsu.com> (raw)
In-Reply-To: <CAFj3OHVh391k5p2aXKP4R6YGEfCmm5GMOTnAMSpvbnyYzrNUDg@mail.gmail.com>

>> I'm not sure from what you write whether you're aware of this, but
>> to work around this, you can then
>>
>>  mount -t cgroup -o cpu /mnt
>>  for i in `cat /mnt/test/tasks`; do
>>  echo $i > /mnt/tasks
>>  done
>>  rmdir /mnt/test
>>  umount /mnt
>>
>> and now you can
>>
>>  mount -cgroup -o cpu,cpuset cgroup /mnt
>>
> 
> I know that I can bypass this problem by deleting subgroups before
> unmount. But there is no document mentioning that I should do this to
> avoid it. But even if there is, users may still directly umount it
> accidentally, then he should try to remember what he has done and back
> to the scene to make it up, or he may need to reboot his server to do
> another test : ( .

You can check /proc/cgroups:

# mount -t cgroup -o cpu,cpuset cgroup /mnt
# mkdir /mnt/sub
# umount /mnt
# cat /proc/cgroups 
#subsys_name    hierarchy       num_cgroups     enabled
cpuset  1       2       1
cpu     1       2       1
memory  0       1       1
devices 0       1       1
freezer 0       1       1
net_cls 0       1       1
blkio   0       1       1

> So, since there is nothing good to permit incompletely unmount, why
> not prevent the potential problem by prohibiting this behavior at
> first ?
> 

  reply	other threads:[~2011-10-11  3:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1318146066.2168.10.camel@handai-OptiPlex-780>
2011-10-09  9:10 ` [Fwd: Re: cgroup umount bug] handai handai
2011-10-11  3:02   ` Li Zefan [this message]
     [not found] ` <CAFj3OHWK+wSVjvWQAv5TH55xSQy3nk1p3Z_e_zLOfxSa+5NGTg@mail.gmail.com>
2011-10-09 14:11   ` Serge E. Hallyn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E93B1CE.4070908@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=handai.szj@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox