From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752342AbdGDVmn (ORCPT ); Tue, 4 Jul 2017 17:42:43 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:42400 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752206AbdGDVml (ORCPT ); Tue, 4 Jul 2017 17:42:41 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Linus Torvalds Cc: , Linux Containers , Date: Tue, 04 Jul 2017 16:34:53 -0500 Message-ID: <87d19fhon6.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1dSVai-0008J0-0S;;;mid=<87d19fhon6.fsf@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=67.3.213.87;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX18AUF36SIwCEfjUI5BFPUobmQm6xl02Xag= X-SA-Exim-Connect-IP: 67.3.213.87 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa08 1397; Body=1 Fuz1=1 Fuz2=1] * 1.2 XMSubMetaSxObfu_03 Obfuscated Sexy Noun-People * 1.0 XMSubMetaSx_00 1+ Sexy Words * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa08 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;Linus Torvalds X-Spam-Relay-Country: X-Spam-Timing: total 280 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 4.2 (1.5%), b_tie_ro: 3.0 (1.1%), parse: 1.03 (0.4%), extract_message_metadata: 4.4 (1.6%), get_uri_detail_list: 2.3 (0.8%), tests_pri_-1000: 2.9 (1.0%), tests_pri_-950: 0.93 (0.3%), tests_pri_-900: 0.75 (0.3%), tests_pri_-400: 19 (6.9%), check_bayes: 18 (6.5%), b_tokenize: 4.3 (1.5%), b_tok_get_all: 7 (2.4%), b_comp_prob: 1.70 (0.6%), b_tok_touch_all: 2.9 (1.0%), b_finish: 0.88 (0.3%), tests_pri_0: 233 (83.2%), check_dkim_signature: 0.41 (0.1%), check_dkim_adsp: 3.2 (1.1%), tests_pri_500: 3.4 (1.2%), rewrite_mail: 0.00 (0.0%) Subject: [GIT PULL] mnt namespace updates for v4.13-rc1 X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus, Please pull the for-linus branch from the git tree: git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git for-linus HEAD: 296990deb389c7da21c78030376ba244dc1badf5 mnt: Make propagate_umount less slow for overlapping mount propagation trees A big break through came during this development cycle as a way was found to maintain the existing umount -l semantics while allowing for optimizations that improve the performance. That is represented by the first change in this series moving the reparenting of mounts into their own pass. This has allowed addressing the horrific performance of umount -l on a carefully crafted tree of mounts with locks held (0.06s vs 60s in my testing). What allowed this was not changing where umounts propagate to while propgating umounts. The next change fixes the case where the order of the mount whose umount are being progated visits a tree where the mounts are stacked upon each other in another order. This is weird but not hard to implement. The final change takes advantage of the unchanging mount propgation tree to skip parts of the mount propgation tree that have already been visited. Yielding a very nice speed up in the worst case. There remains one outstanding question about the semantics of umount -l that I am still discussiong with Ram Pai. In practice that area of the semantics was changed by 1064f874abc0 ("mnt: Tuck mounts under others instead of creating shadow/side mounts.") and no regressions have been reported. Still I intend to finish talking that out with him to ensure there is not something a more intense use of mount propagation in the future will not cause to become significant. Eric W. Biederman (3): mnt: In umount propagation reparent in a separate pass mnt: In propgate_umount handle visiting mounts in any order mnt: Make propagate_umount less slow for overlapping mount propagation trees fs/mount.h | 1 + fs/namespace.c | 1 + fs/pnode.c | 212 ++++++++++++++++++++++++++++++++++++++++++++------------- 3 files changed, 165 insertions(+), 49 deletions(-) Eric