From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Subject: Re: [GIT PULL] Detaching mounts on unlink for 3.15 Date: Thu, 17 Apr 2014 14:23:27 -0700 Message-ID: <87tx9rwsz4.fsf@x220.int.ebiederm.org> References: <87fvlm860e.fsf_-_@x220.int.ebiederm.org> <20140409232423.GB18016@ZenIV.linux.org.uk> <87lhva5h4k.fsf@x220.int.ebiederm.org> <20140413053956.GM18016@ZenIV.linux.org.uk> <87zjjp3e7w.fsf@x220.int.ebiederm.org> <87ppkl1xb7.fsf@x220.int.ebiederm.org> <20140413215242.GP18016@ZenIV.linux.org.uk> <87y4z8uzqw.fsf_-_@x220.int.ebiederm.org> <87ppkhc4pp.fsf@x220.int.ebiederm.org> <87ha5r3emw.fsf_-_@x220.int.ebiederm.org> <20140417202237.GA18016@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain Cc: Linus Torvalds , "Serge E. Hallyn" , Linux-Fsdevel , Kernel Mailing List , Andy Lutomirski , Rob Landley , Miklos Szeredi , Christoph Hellwig , Karel Zak , "J. Bruce Fields" , Fengguang Wu , tytso@mit.edu To: Al Viro Return-path: Received: from out02.mta.xmission.com ([166.70.13.232]:52240 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751007AbaDQVYA (ORCPT ); Thu, 17 Apr 2014 17:24:00 -0400 In-Reply-To: <20140417202237.GA18016@ZenIV.linux.org.uk> (Al Viro's message of "Thu, 17 Apr 2014 21:22:37 +0100") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Al Viro writes: > Have you tried to profile something like umount -l on a large mount tree? > You variant causes a shitstorm of > schedule work > switch to workqueue > do actual fs shutdown > wake umount(8) up > get through wait_for_completion() > for every bleeding vfsmount in there. And no, it's *not* guaranteed to > be dominated by fs shutdown time. Here's the case where it definitely > won't be: > mkdir /tmp/a > mount --rbind / /tmp/a > umount -l /tmp/a > > All vfsmounts involved are killed off with no fs shutdown. And that's > *not* a rare case - exit of the last process in namespace is very likely > to look that way too. > > That's far too heavy. The typically system has about 12 mounts and no mount namespaces. Making umount of any kind a rare case. Al my apologies for not picking your favorite solution and in choosing not to audit every call to mntput in the tree this week I have made an uncommon case slower. These bug fixes are important, the code is correct, and it is technically straight forward to remove the wait in mntput in most cases. I am very frustrated that when given lots of opportunities to look at and comment on my code it is hard to get you to engage and comment unless I send a pull request to Linus. This last objection really looks to be a case of perfection getting in the way of the good. Eric