Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2023304lqa; Tue, 30 Apr 2024 06:29:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVT8H9zeuiLuDwIVpGQRJCTejYr/py2h+I8baAYDgdyswt7VxPEGMQgohRlD72Q4UPqWEtzUPEJ0ALnWQT5ABR8VAM3hV8NU0otHBGeiA== X-Google-Smtp-Source: AGHT+IF/EXYRWJmmpQACDUv16EjvZZdP+M3TXsmJuBAo6M2JSLQbuJsWm6z5U+e2XjnmVbPLpwLv X-Received: by 2002:a05:6a21:996:b0:1a9:5a2a:7e37 with SMTP id li22-20020a056a21099600b001a95a2a7e37mr13399769pzb.56.1714483761076; Tue, 30 Apr 2024 06:29:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714483761; cv=pass; d=google.com; s=arc-20160816; b=sSz1vYsW8gVLIuKoRllJKetUt24YkKQYc62H6nr/qnrNpOrM265aWtddVz3LDByF5Y NMvIAbdBUv0pG9jUgTLI083bBnBXomr0scxKbfgPBtOoiiKkR18Swa6neuU5WhmsvnNh yxYDr8vUG6VcnfoXactfCnBiuflaU8H9ExpwXgrWKefJIflEIyiukNxwMlEdicwnCUbb XUwG5lEUKf4TlPB6kozSO4UO0HANS5kI9UidMnG63O6yW7GgAkv8WqOqsCK6i2smssVf JzKPv20iF8HSzKhPOaaZQ+ukpO4/viRI4BOEbgoNPA0uGJnzBumSYlwHloeZXEkiQQnc kUXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=5bYB5V2IJRmUQ43j0ThALYY+p/bSkCZh56Wtp2ChfRM=; fh=WA4VyoPQMxN0Fwum8IsdPU1LOzX059o9KTbX6uG5SJ4=; b=lf2URv5sW47Y0acHJHGjvjpdd02PR4Mt1GwFrHdkZafG42uEQyAS4Rzb8fFBYF4gHc 1UmMj8tG8byptu/f0LpGMLHBNtxb9oiB/fenUoketrxGk9CxBVmgHfF+iFRyp6mr28pd JQ2ul28u87+vWXa3ixHhgu0pgedmeZE96Iy5t4succ/tperHnOuljICwlS5nYSYSQRay u/ebCC2UBnuHhSk5YDznFqtd4TBbw4Px8tDs6/TxGg4GIXjvG/jfnsO2wll3pD2lcEY9 mdlYjAX2tiitUEU77Wf3jYdzSV7Xt524Aaq5bqLR3n6DpiApQQJi10wBMl/+E+Mw7gDR VGkw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TKgN3mp1; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-163996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163996-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id v13-20020a056a00148d00b006f384899b4fsi12200659pfu.323.2024.04.30.06.29.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 06:29:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TKgN3mp1; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-163996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163996-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2F300B20A4C for ; Tue, 30 Apr 2024 13:26:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A252171E45; Tue, 30 Apr 2024 13:26:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="TKgN3mp1" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC58217107C for ; Tue, 30 Apr 2024 13:26:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714483563; cv=none; b=mi7BZJcj+57lw+t1WcYmouzMSR8+BW2Dw1RDiqgAwmPSuF5BBS40p6yq6gx6zKvguKo6oE0JbfqMcWL1F6nz/PzKjXQvUOVNB5Q5A4RJuhuX51WBjfAr06NJb3rlwZ3N8eMfuDTDYHbSTdjZ3FssrYcOfzJ5/9XwgFvrQRhCez4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714483563; c=relaxed/simple; bh=qxKHc+3IjdtgWPSzmFTsm4Rp1Qe+Rn+ZDTiZ1WfOFko=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LhiXCh3vad3Azb1sP4wLcUCa+t7xkQA/7zkF+87IwHA0EEsKFzpj9KZ4PGgbF4THU6GkXRDqjHSIHutGAI/YSwcpAUV8Mfh+KHnX7qe/GFPtt2JQ+yBtW1XCazs8eSlgs6iyaRoI32mZzHWog4TWeVLT2EzPdi1xj0vD/Z3l9H4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=TKgN3mp1; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714483561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5bYB5V2IJRmUQ43j0ThALYY+p/bSkCZh56Wtp2ChfRM=; b=TKgN3mp1nzxKiW0+mFPO9QhGqOgUwphUI1rXXRztjq/3yiScgCF7wxwosLythA8IPgkI6H 0LE65GEvOFQl8LxsVV+UfYI2zOEsvSnjMMZlGM9qHeEtIespjPvHGbS929riUjbcEtTJaR GgpcNhGafX1kWceksv0m5GIOMVQqd6o= Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-690-vfWSqs9wMNqLn-Nnsnf4pw-1; Tue, 30 Apr 2024 09:25:59 -0400 X-MC-Unique: vfWSqs9wMNqLn-Nnsnf4pw-1 Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-1e99fd7eadaso63674935ad.2 for ; Tue, 30 Apr 2024 06:25:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714483558; x=1715088358; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5bYB5V2IJRmUQ43j0ThALYY+p/bSkCZh56Wtp2ChfRM=; b=kAuINZqa0OY1Ex1xrPMcFqbKuyvI6ElR6x7i9qITpJ5NVWTQoZ9PjxFuMG5tSxNlIg KK6ik/vrNu7dnKNqzjNb8INzeKdTvJ26twR2/UNB3JZrcAmq3lLTFOHdOCYnZaRapPWN XO5BlxX/Ib/jNHtYZfr2f3uDg3gD3F7jxhHhnDDKnR8aS+npFZDMcfWa5AItM/mYxgdb 2nj2OmxMY0TCbUFu8bxFWH3+gmdCEZXGzCAcFj4TgsUM8XwOVDYiTMJGQ1ubS5T87Ozt Y5c8jrkI8vMCFQGU2EvN9XyWlHHWJmalA3ghYvNgi6Z26l+gyQrfbSUFFYG8AZvADsUe edqw== X-Forwarded-Encrypted: i=1; AJvYcCVwti1+X8O+tXISch1WSSQYJz2HVhyJu1P/Cj2K6xnIUiqK2kA56myjTzCuJ+tSppUyTV0SjSUJM0FIBFNN0dQ4pn+SuOzzYKQIkDSA X-Gm-Message-State: AOJu0YzSHe5CPNbOYoAUMZpV3MAjjARe12QBV2rf9SqjLbtto7u4ISg/ bAdqEUbdarXCTMGflYP/rKrzl7Kfzda4R3j4tNHBxf9UzHPBZGsyl4/wMJIeCjXZ7UV9XtfMqWu 3S/0hJwmTVhxV5Z8Da1jcjvAuFtgYq4axPPSDoZopx8lVs5cVIpIoNY2KyyL2eQ== X-Received: by 2002:a17:902:f550:b0:1eb:b50e:3577 with SMTP id h16-20020a170902f55000b001ebb50e3577mr10570423plf.56.1714483558651; Tue, 30 Apr 2024 06:25:58 -0700 (PDT) X-Received: by 2002:a17:902:f550:b0:1eb:b50e:3577 with SMTP id h16-20020a170902f55000b001ebb50e3577mr10570389plf.56.1714483558318; Tue, 30 Apr 2024 06:25:58 -0700 (PDT) Received: from fedora ([142.189.203.61]) by smtp.gmail.com with ESMTPSA id l13-20020a170902f68d00b001ebd7ef383fsm3846580plg.203.2024.04.30.06.25.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 06:25:57 -0700 (PDT) Date: Tue, 30 Apr 2024 09:25:55 -0400 From: Lucas Karpinski To: Al Viro Cc: brauner@kernel.org, jack@suse.cz, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, alexl@redhat.com, echanude@redhat.com, ikent@redhat.com, ahalaney@redhat.com Subject: Re: [RFC v2 1/1] fs/namespace: defer RCU sync for MNT_DETACH umount Message-ID: <6rp73lih7g2b7i5rhsztwc66quq6fi3mesel52uavvt7uhfzlf@6rytjc7gb2tj> References: <20240426195429.28547-1-lkarpins@redhat.com> <20240426195429.28547-2-lkarpins@redhat.com> <20240426200941.GP2118490@ZenIV> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240426200941.GP2118490@ZenIV> User-Agent: NeoMutt/20240201 On Fri, Apr 26, 2024 at 09:09:41PM +0100, Al Viro wrote: > > + call_rcu(&drelease->rcu, delayed_mount_release); > > ... which is a bad idea, since call_rcu() callbacks are run > from interrupt context. Which makes blocking in them a problem. > Thanks for the quick review. Documentation/RCU/checklist.rst suggests switching to queue_rcu_work() function in scenarios where the callback function can block. This seems like it would fix the issue you found, while still providing similar performance improvements. workqueue: perf stat -r 10 --null --pre 'mount -t tmpfs tmpfs mnt' -- umount -l mnt 0.003066 +- 0.000307 seconds time elapsed ( +- 10.02% ) callrcu: perf stat -r 10 --null --pre 'mount -t tmpfs tmpfs mnt' -- umount -l mnt 0.0030812 +- 0.0000524 seconds time elapsed ( +- 1.70% ) Regards, Lucas