From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54298C46467 for ; Thu, 19 Jan 2023 22:21:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230165AbjASWVR (ORCPT ); Thu, 19 Jan 2023 17:21:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230206AbjASWUp (ORCPT ); Thu, 19 Jan 2023 17:20:45 -0500 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC3C56A40; Thu, 19 Jan 2023 14:03:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=p9Z+Yh5j2hHRnI1dTcIkipPU5fNAxSSsh4y2kn8Gq5A=; b=aNssFuNpx0WmIbJlX5P0hvebXE nccag5OkWX4/UsWrQTfQ0KYWgsChCf2ZU2kxBZihsIixWpGLFxGfah7boyRB5ladtE9B2qJeoHpMY YS/aFgivlkTa1HHPn9sSAJBze726rX1o/kmYazk2HU9OtWLZNjkSkOisVPBAAhY/Qa7WoD7QrSuVl +H2eOrM02hbt8DPHFkhGcPGOuMeSK8BXgofuNuCLr9Zge0XrbEjkgo5G5PC1rO9pk0aWBp2vjhsl0 YisrO0TY6+3sgIgKTA6xLpW9vJ9h8VzM+cNMKfkPhMqU8EFAmFTSPdIv6L8jT94gVcThmOzydGHsA 0oxri4Nw==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1pId0N-002smJ-0r; Thu, 19 Jan 2023 22:03:31 +0000 Date: Thu, 19 Jan 2023 22:03:31 +0000 From: Al Viro To: Eric Chanudet Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Larsson , Andrew Halaney Subject: Re: [RFC PATCH 1/1] fs/namespace: defer free_mount from namespace_unlock Message-ID: References: <20230119205521.497401-1-echanude@redhat.com> <20230119205521.497401-2-echanude@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230119205521.497401-2-echanude@redhat.com> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, Jan 19, 2023 at 03:55:21PM -0500, Eric Chanudet wrote: > From: Alexander Larsson > > Use call_rcu to defer releasing the umount'ed or detached filesystem > when calling namepsace_unlock(). > > Calling synchronize_rcu_expedited() has a significant cost on RT kernel > that default to rcupdate.rcu_normal_after_boot=1. > > For example, on a 6.2-rt1 kernel: > perf stat -r 10 --null --pre 'mount -t tmpfs tmpfs mnt' -- umount mnt > 0.07464 +- 0.00396 seconds time elapsed ( +- 5.31% ) > > With this change applied: > perf stat -r 10 --null --pre 'mount -t tmpfs tmpfs mnt' -- umount mnt > 0.00162604 +- 0.00000637 seconds time elapsed ( +- 0.39% ) > > Waiting for the grace period before completing the syscall does not seem > mandatory. The struct mount umount'ed are queued up for release in a > separate list and no longer accessible to following syscalls. You *really* do not want to have umount(2) return without having the filesystems shut down.