Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp584934ybe; Wed, 11 Sep 2019 01:20:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqywlhLFnkwchbEdZiTCg91R9ibBRNTJqB27sn/FL6NnzJ2nS+bTS9byEjzTPgPs7oq5FE6T X-Received: by 2002:a50:c052:: with SMTP id u18mr35035568edd.88.1568190036885; Wed, 11 Sep 2019 01:20:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568190036; cv=none; d=google.com; s=arc-20160816; b=SCTZpO+6WuO44761flNJlrfpD1mOlH7qz/hccbeCFfnjpMzvXBiIUEgJIFChXPGGLr 3unsrdv19lFfIIVy9mCo4eEjWkZ0mBiFQi71/hPsZhAf6ZJw20QcGpmpSpxIf1icDOrb F+MbHH2ssEAEi+SZMu0x08KBgEkQGoqRTvSY6puFKtKSvh1F3/+MNBeofExSax1Wv5Qa Z6IKeeo9rplb9Grk/3ZOt0qi52whdQJQ6WBO9E5OANabUK3iPVJ2PkIm3VuX3B/65y0d NoEWXaIQd504CbwuXPfajTUYceevPvmc23s3aTgSxSWgr54iPFoquHAdMhxQ4GSWjCUA mpcg== 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:dkim-signature; bh=73Mk7Z9yNYBR9L0eb9oAsrN33Ivf779654SN9226Yx0=; b=jDzPJLn7YwXCyYRyDyY4REmZwXJMEfRHULjWQha2zy9+c2sgxmo6H2iV2AVCwmPnh8 ZOwg8Gd5PH+U8rCeASI5cDg5+JTwMFATJ1/2y+0WqTAv725fPFTI+THQcd5UhuJXrQSj 70TrdsPwps3IX854B5z4bMPQoLyqL5RKE6CpJmBls9k6p0EB2LYYCnLLGO+LQVl6kMI3 YVujLhalOxR0vbXc4ykSwiCs9ZTtBkenIfycFfakhH/euGkV6GGfxP/J9skQkD+as2+9 3e0gKc8x5x+i/5+JwVzDhJf2KxfOHtTOnv02qQZHQFS6FsrlH7gBReqe+/IBUSDOmlCt nE/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=lzzM8L2D; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z47si12800980edc.30.2019.09.11.01.20.11; Wed, 11 Sep 2019 01:20:36 -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; dkim=pass header.i=@ziepe.ca header.s=google header.b=lzzM8L2D; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727072AbfIKIUE (ORCPT + 99 others); Wed, 11 Sep 2019 04:20:04 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:53042 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726579AbfIKIUD (ORCPT ); Wed, 11 Sep 2019 04:20:03 -0400 Received: by mail-wm1-f68.google.com with SMTP id t17so2309613wmi.2 for ; Wed, 11 Sep 2019 01:20:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=73Mk7Z9yNYBR9L0eb9oAsrN33Ivf779654SN9226Yx0=; b=lzzM8L2DKputz7E8BnA9+EcELiqTMUGOY69T7jjCa9uf+uWvwuzpYYhL8Nv5LJzUtX pslPCUzteUedVsAO7Uh+akynz719MT5rU3CXAGnZCX0ho9qVu76a27TAVjsgM+zyeS0A ksacMXfdU7LVCHgRBpm9gajfZbu7oGrLchB/8Y3McmIxN2Ul3PI2FPJ6afqOio//N9LI ta5N/T+t0ETYEJ3C2risxGC6eu0pHf9Q4eQXPLAVzrsLwff2DyzqLQjOsshK+m9pnUg8 AU6Bi9iICYiPINavXSkRjPjWy0lqtq5O3QvUmqqLA1ovJHhVXc3YwX7OtEYjLY+gIZdo OoQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=73Mk7Z9yNYBR9L0eb9oAsrN33Ivf779654SN9226Yx0=; b=pX0GlewiGTv9EarHGHS092f9GQi7wLHMYqcdHKt0JYNfvJSwOvTaZEzv0ng00NsUZG Iao1tQL/sFnhy6IatpbqlsnCVKj5/U7RVQw07Ezh+mVuHrUKr8xiCYKg2iLbcRLVy+QP ClLfLc43DJnUyABliZm3hasOxJSUNgDYjuS6NCSZ9EQpTJZiSB385o7JKi3plpWaQP3e WLpwncc9XDtxkFmbCp9wX21OZ3Ux+DnizPOR4wrArBXi3hjuqJmaw3Yam8kCPBHUoFLK FXI9vlxnQD9+Oy5CnBLxp5ASYfpTDQ8rBTh2uiDqh0v1YU/h2Gf/EiM+K+b/hYAuG2sC NywA== X-Gm-Message-State: APjAAAVrVBFDMDer5IjerDfxcVNXBLRUssVzIxDxJIG8pWDT7AO41Fr/ jOyh1grnEbpyc8+bia41BGw/gw== X-Received: by 2002:a7b:c752:: with SMTP id w18mr2765612wmk.63.1568189997578; Wed, 11 Sep 2019 01:19:57 -0700 (PDT) Received: from ziepe.ca ([148.69.85.38]) by smtp.gmail.com with ESMTPSA id a13sm36163114wrf.73.2019.09.11.01.19.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Sep 2019 01:19:56 -0700 (PDT) Received: from jgg by jggl.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1i7xr1-0002Mq-Vn; Wed, 11 Sep 2019 05:19:55 -0300 Date: Wed, 11 Sep 2019 05:19:55 -0300 From: Jason Gunthorpe To: Ira Weiny Cc: Andrew Morton , Dan Williams , Matthew Wilcox , Jan Kara , Theodore Ts'o , John Hubbard , Michal Hocko , Dave Chinner , 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 16/19] RDMA/uverbs: Add back pointer to system file object Message-ID: <20190911081955.GA9070@ziepe.ca> References: <20190812130039.GD24457@ziepe.ca> <20190812172826.GA19746@iweiny-DESK2.sc.intel.com> <20190812175615.GI24457@ziepe.ca> <20190812211537.GE20634@iweiny-DESK2.sc.intel.com> <20190813114842.GB29508@ziepe.ca> <20190813174142.GB11882@iweiny-DESK2.sc.intel.com> <20190813180022.GF29508@ziepe.ca> <20190813203858.GA12695@iweiny-DESK2.sc.intel.com> <20190814122308.GB13770@ziepe.ca> <20190904222549.GC31319@iweiny-DESK2.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190904222549.GC31319@iweiny-DESK2.sc.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Sep 04, 2019 at 03:25:50PM -0700, Ira Weiny wrote: > On Wed, Aug 14, 2019 at 09:23:08AM -0300, Jason Gunthorpe wrote: > > On Tue, Aug 13, 2019 at 01:38:59PM -0700, Ira Weiny wrote: > > > On Tue, Aug 13, 2019 at 03:00:22PM -0300, Jason Gunthorpe wrote: > > > > On Tue, Aug 13, 2019 at 10:41:42AM -0700, Ira Weiny wrote: > > > > > > > > > And I was pretty sure uverbs_destroy_ufile_hw() would take care of (or ensure > > > > > that some other thread is) destroying all the MR's we have associated with this > > > > > FD. > > > > > > > > fd's can't be revoked, so destroy_ufile_hw() can't touch them. It > > > > deletes any underlying HW resources, but the FD persists. > > > > > > I misspoke. I should have said associated with this "context". And of course > > > uverbs_destroy_ufile_hw() does not touch the FD. What I mean is that the > > > struct file which had file_pins hanging off of it would be getting its file > > > pins destroyed by uverbs_destroy_ufile_hw(). Therefore we don't need the FD > > > after uverbs_destroy_ufile_hw() is done. > > > > > > But since it does not block it may be that the struct file is gone before the > > > MR is actually destroyed. Which means I think the GUP code would blow up in > > > that case... :-( > > > > Oh, yes, that is true, you also can't rely on the struct file living > > longer than the HW objects either, that isn't how the lifetime model > > works. > > Reviewing all these old threads... And this made me think. While the HW > objects may out live the struct file. > > They _are_ going away in a finite amount of time right? It is not like they > could be held forever right? Yes, at least until they become shared between FDs Jason