* mount cgroup with "already mounted or cgroup busy"
@ 2019-10-30 9:32 Li,Rongqing
2019-11-22 15:19 ` Michal Koutný
0 siblings, 1 reply; 2+ messages in thread
From: Li,Rongqing @ 2019-10-30 9:32 UTC (permalink / raw
To: linux-kernel@vger.kernel.org
Cc: tj@kernel.org, lizefan@huawei.com, hannes@cmpxchg.org,
cgroups@vger.kernel.org
Hi:
I meet a issue, and not sure if it is normal
Using the below script, the last line mount will fail after unmount
And it will fail until reboot system
mount -t cgroup -o cpu,cpuset xx cgroup
mkdir cgroup/x
rmdir cgroup/x
umount cgroup
mount -t cgroup -o cpu xx cgroup
mount: xx already mounted or cgroup busy
but if I add sleep, it will success
mount -t cgroup -o cpu,cpuset xx cgroup
mkdir cgroup/x
rmdir cgroup/x
sleep 10 <<<<==========
umount cgroup
mount -t cgroup -o cpu xx cgroup
- Li RongQing
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: mount cgroup with "already mounted or cgroup busy"
2019-10-30 9:32 mount cgroup with "already mounted or cgroup busy" Li,Rongqing
@ 2019-11-22 15:19 ` Michal Koutný
0 siblings, 0 replies; 2+ messages in thread
From: Michal Koutný @ 2019-11-22 15:19 UTC (permalink / raw
To: Li,Rongqing
Cc: linux-kernel@vger.kernel.org, tj@kernel.org, lizefan@huawei.com,
hannes@cmpxchg.org, cgroups@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 782 bytes --]
Hello Li.
On Wed, Oct 30, 2019 at 09:32:41AM +0000, "Li,Rongqing" <lirongqing@baidu.com> wrote:
> I meet a issue, and not sure if it is normal
It is a consequence of how cgroup state is retained.
I considered a "trivial" fix, however, I learnt later it'd be a revert
(and hence regression) of
3c606d35fe97 "cgroup: prevent mount hang due to memory controller lifetime"
> Using the below script, the last line mount will fail after unmount
> And it will fail until reboot system
The cause is that controllers remained pinned to the same root.
You can unpin them by mounting/unmounting again attached to the same
root (i.e. cpu,cpuset again).
(Perhaps the logic in cgroup1_root_to_use may be changed to cope better
with the "stateless" controllers.)
Michal
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-22 15:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-30 9:32 mount cgroup with "already mounted or cgroup busy" Li,Rongqing
2019-11-22 15:19 ` Michal Koutný
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.