From: ebiederm@xmission.com (Eric W. Biederman)
To: Andrei Vagin <avagin@openvz.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
containers@lists.linux-foundation.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mount: dont execute propagate_umount() many times for same mounts
Date: Thu, 06 Oct 2016 14:46:30 -0500 [thread overview]
Message-ID: <87eg3tclbd.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <1475772564-25627-1-git-send-email-avagin@openvz.org> (Andrei Vagin's message of "Thu, 6 Oct 2016 09:49:24 -0700")
Andrei Vagin <avagin@openvz.org> writes:
> The reason of this optimization is that umount() can hold namespace_sem
> for a long time, this semaphore is global, so it affects all users.
> Recently Eric W. Biederman added a per mount namespace limit on the
> number of mounts. The default number of mounts allowed per mount
> namespace at 100,000. Currently this value is allowed to construct a tree
> which requires hours to be umounted.
I am going to take a hard look at this as this problem sounds very
unfortunate. My memory of going through this code before strongly
suggests that changing the last list_for_each_entry to
list_for_each_entry_reverse is going to impact the correctness of this
change.
The order of traversal is important if there are several things mounted
one on the other that are all being unmounted.
Now perhaps your other changes have addressed that but I haven't looked
closely enough to see that yet.
> @@ -454,7 +473,7 @@ int propagate_umount(struct list_head *list)
> list_for_each_entry_reverse(mnt, list, mnt_list)
> mark_umount_candidates(mnt);
>
> - list_for_each_entry(mnt, list, mnt_list)
> + list_for_each_entry_reverse(mnt, list, mnt_list)
> __propagate_umount(mnt);
> return 0;
> }
Eric
next prev parent reply other threads:[~2016-10-06 19:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-06 16:49 Andrei Vagin
2016-10-06 19:46 ` Eric W. Biederman [this message]
2016-10-06 23:06 ` Andrei Vagin
2016-10-07 4:45 ` Eric W. Biederman
2016-10-10 20:42 ` Andrei Vagin
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=87eg3tclbd.fsf@x220.int.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=avagin@openvz.org \
--cc=containers@lists.linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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
Powered by JetHome