Received: by 10.223.164.202 with SMTP id h10csp1482011wrb; Mon, 27 Nov 2017 03:28:01 -0800 (PST) X-Google-Smtp-Source: AGs4zMYuueNFg/tDDb5P6ekGYIHu3gS09Pc0QHagLFovaObSundzrgs9k2IgXrS9SZuafP5Q3d3L X-Received: by 10.84.138.1 with SMTP id 1mr37592322plo.156.1511782081087; Mon, 27 Nov 2017 03:28:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511782081; cv=none; d=google.com; s=arc-20160816; b=0wjKXFEMffCRKxmdhMInT+23/t6GMGx/Npj4H4JUes8B3qZY2ph9Mu9NZs3xxThREu osFdmdA6tuWDMgwMXxIgtVDsRok2+B2wQviBbiRUFnsARkZY2jgeQFl54JXye6GRtTOC bAJe+GP9caijq5hm6XJ1Y12TVBoFu7UHXNP1siJaLRoY7PwsSJyQ4yWyMEfM3iXSe6hX OB3zZWH22FrS+HfT5+wGlTne33R+SegUA0g0BL+JusdGQGzPFIV41vbDXcbjp/GcEsWD 8zU8whVVOLZHdcH7SvcuVYbR5r/TleTZ+JqB6MRA0A9/LhCRG+frZlF8mM9hzR7d5Gp+ 3RzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=vcXSfNULGjkS5WkuXFPfff1QQEbWzAhNptQR7iMn6VY=; b=SOANPwc/i63+Op2gijkuFCuI7RLpKqKEgJZZsuIiObw5NIhFVRPurP5X38sNIS1C6Q tdEokRCCWsb3S6oqgdzHxN79FlCDx41sLiWvJB/tHL525UBFZNc4/lIBVRDd6zcgZM97 KG7msPgDuxhb8pWQVaFJXvfcnHZgThNcf+cBnu0CGMPvtlHTnMTm23HOA+Bahsmvdu8v gT0+ZPtOM6gD43C0q4cbS2kTo5bqG1LsfDag92OkUasXo1f9lmz8a1ZuqtgiV7ZweaLm 6cbJv0SVomqnMxsr4YE5EGpYQhKjWwV3B3zKQGAlY3KJoE/nvHT3hpvy2IIil6sv4OQj /UCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si23571093pld.101.2017.11.27.03.27.48; Mon, 27 Nov 2017 03:28:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751849AbdK0L1J (ORCPT + 77 others); Mon, 27 Nov 2017 06:27:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57554 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751375AbdK0L1I (ORCPT ); Mon, 27 Nov 2017 06:27:08 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0CD954DB12; Mon, 27 Nov 2017 11:27:08 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-116-47.ams2.redhat.com [10.36.116.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1B56A60602; Mon, 27 Nov 2017 11:27:05 +0000 (UTC) Subject: Re: [PATCH] VFS: use synchronize_rcu_expedited() in namespace_unlock() To: paulmck@linux.vnet.ibm.com, NeilBrown Cc: Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Triplett References: <87y3nyd4pu.fsf@notabene.neil.brown.name> <20171026122743.GX3659@linux.vnet.ibm.com> From: Florian Weimer Message-ID: Date: Mon, 27 Nov 2017 12:27:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171026122743.GX3659@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 27 Nov 2017 11:27:08 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/26/2017 02:27 PM, Paul E. McKenney wrote: > But just for completeness, one way to make this work across the board > might be to instead use call_rcu(), with the callback function kicking > off a workqueue handler to do the rest of the unmount. Of course, > in saying that, I am ignoring any mutexes that you might be holding > across this whole thing, and also ignoring any problems that might arise > when returning to userspace with some portion of the unmount operation > still pending. (For example, someone unmounting a filesystem and then > immediately remounting that same filesystem.) You really need to complete all side effects of deallocating a resource before returning to user space. Otherwise, it will never be possible to allocate and deallocate resources in a tight loop because you either get spurious failures because too many unaccounted deallocations are stuck somewhere in the system (and the user can't tell that this is due to a race), or you get an OOM because the user manages to queue up too much state. We already have this problem with RLIMIT_NPROC, where waitpid etc. return before the process is completely gone. On some kernels/configurations, the resulting race is so wide that parallel make no longer works reliable because it runs into fork failures. Thanks, Florian From 1582371983667630143@xxx Fri Oct 27 01:25:19 +0000 2017 X-GM-THRID: 1582285390305666064 X-Gmail-Labels: Inbox,Category Forums