Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3239354ybl; Mon, 19 Aug 2019 14:53:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxOdtKpPcRu5ovJGpvMT6nYd1tvkPGV7p+WHaaOpcc6nK4kSHeRplBGam/1ChgrFEmNlT63 X-Received: by 2002:a63:6146:: with SMTP id v67mr22857222pgb.271.1566251633153; Mon, 19 Aug 2019 14:53:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566251633; cv=none; d=google.com; s=arc-20160816; b=h8d2yiBGst/IfXFfeo66lJR1x8HU7YDXdYzc++SBJw4lIJBlpNqRN9RERCZt+tDX4B pgCQIyxMJ6UqypHJFXH3NbP9JmlxClk3BwBcDuyIPD0R2rv114T2CuDPl9US9UvLAS/1 HV5zI92hGSOhboYjK+GDBKOebpoMiOU81F+mnJJQn+4gnyBIk/HoGpiCGATR4I6mDPZt BIc8ckqMGemy7T/fbKVPN73vkhcFaHILM3+nBpNG1eNRbUccnboJM2khTntAM4nz2Q/z Ag3LqGnQb1qaQMuaxs/QHtQFL9jFrg2LWElT0xbgYCxeHFXwKmMd3IrhIkCMS3qRnNco ItFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=iWKNV6DXSUkDnQlIsKxKRId/s1ihisWjS3T1AQlT5M8=; b=j0ZiulX1izOdm4rC8SUFdl9DbFzaOfrTiDEpAInLI2IGRHqI0Dzq6Js4wJut41lOJu 7x/e4zZOZAVBnSw9XyMnSMZun5Ynxe+3IHSxSWi+uYpEWZ9NSM+dGvfkukTQApokf0yq 8vLDvP65zGuRg8pegM/j2+RerVMrW4UnSLHfacGLmOr+8PnDacGIkMUynxIRAQ0fbkLy LqlGL6+OID2ffhHGaUT9/kFoF0o8OQcU0sle89vaVpBWQFztgWE0LEKa3fGMYgDmfA03 RD2gw4AK2JnwAHiNU9FM6gF/8y63gZFdYNSEoSwZEvO917M+3zg30X4EqLno91WHr/It J/ZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 44si952693pld.137.2019.08.19.14.53.30; Mon, 19 Aug 2019 14:53:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728358AbfHSVx1 (ORCPT + 99 others); Mon, 19 Aug 2019 17:53:27 -0400 Received: from mga18.intel.com ([134.134.136.126]:6061 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728352AbfHSVx0 (ORCPT ); Mon, 19 Aug 2019 17:53:26 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Aug 2019 14:53:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,406,1559545200"; d="scan'208";a="189658795" Received: from iweiny-desk2.sc.intel.com ([10.3.52.157]) by orsmga002.jf.intel.com with ESMTP; 19 Aug 2019 14:53:23 -0700 Date: Mon, 19 Aug 2019 14:53:23 -0700 From: Ira Weiny To: Jason Gunthorpe Cc: Dave Chinner , Jan Kara , Andrew Morton , Dan Williams , Matthew Wilcox , Theodore Ts'o , John Hubbard , Michal Hocko , linux-xfs@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nvdimm@lists.01.org, linux-ext4@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH v2 00/19] RDMA/FS DAX truncate proposal V1,000,002 ;-) Message-ID: <20190819215322.GA2839@iweiny-DESK2.sc.intel.com> References: <20190809225833.6657-1-ira.weiny@intel.com> <20190814101714.GA26273@quack2.suse.cz> <20190814180848.GB31490@iweiny-DESK2.sc.intel.com> <20190815130558.GF14313@quack2.suse.cz> <20190816190528.GB371@iweiny-DESK2.sc.intel.com> <20190817022603.GW6129@dread.disaster.area> <20190819063412.GA20455@quack2.suse.cz> <20190819092409.GM7777@dread.disaster.area> <20190819123841.GC5058@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190819123841.GC5058@ziepe.ca> User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Aug 19, 2019 at 09:38:41AM -0300, Jason Gunthorpe wrote: > On Mon, Aug 19, 2019 at 07:24:09PM +1000, Dave Chinner wrote: > > > So that leaves just the normal close() syscall exit case, where the > > application has full control of the order in which resources are > > released. We've already established that we can block in this > > context. Blocking in an interruptible state will allow fatal signal > > delivery to wake us, and then we fall into the > > fatal_signal_pending() case if we get a SIGKILL while blocking. > > The major problem with RDMA is that it doesn't always wait on close() for the > MR holding the page pins to be destoyed. This is done to avoid a > deadlock of the form: > > uverbs_destroy_ufile_hw() > mutex_lock() > [..] > mmput() > exit_mmap() > remove_vma() > fput(); > file_operations->release() > ib_uverbs_close() > uverbs_destroy_ufile_hw() > mutex_lock() <-- Deadlock > > But, as I said to Ira earlier, I wonder if this is now impossible on > modern kernels and we can switch to making the whole thing > synchronous. That would resolve RDMA's main problem with this. I'm still looking into this... but my bigger concern is that the RDMA FD can be passed to other processes via SCM_RIGHTS. Which means the process holding the pin may _not_ be the one with the open file and layout lease... Ira