[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240812231249.GG1985367@ziepe.ca>
Date: Mon, 12 Aug 2024 20:12:49 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: Christoph Hellwig <hch@...radead.org>
Cc: Martin Oliveira <martin.oliveira@...eticom.com>,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
Artemy Kovalyov <artemyko@...dia.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Leon Romanovsky <leon@...nel.org>,
Logan Gunthorpe <logang@...tatee.com>,
Michael Guralnik <michaelgur@...dia.com>,
Mike Marciniszyn <mike.marciniszyn@...el.com>,
Shiraz Saleem <shiraz.saleem@...el.com>, Tejun Heo <tj@...nel.org>,
John Hubbard <jhubbard@...dia.com>,
Dan Williams <dan.j.williams@...el.com>,
David Sloan <david.sloan@...eticom.com>
Subject: Re: [PATCH v5 3/4] mm/gup: allow FOLL_LONGTERM & FOLL_PCI_P2PDMA
On Sun, Aug 11, 2024 at 11:39:22PM -0700, Christoph Hellwig wrote:
> On Thu, Aug 08, 2024 at 12:33:39PM -0600, Martin Oliveira wrote:
> > This check existed originally due to concerns that P2PDMA needed to copy
> > fsdax until pgmap refcounts were fixed (see [1]).
> >
> > The P2PDMA infrastructure will only call unmap_mapping_range() when the
> > underlying device is unbound, and immediately after unmapping it waits
> > for the reference of all ZONE_DEVICE pages to be released before
> > continuing. This does not allow for a page to be reused and no user
> > access fault is therefore possible. It does not have the same problem as
> > fsdax.
> >
> > The one minor concern with FOLL_LONGTERM pins is they will block device
> > unbind until userspace releases them all.
>
> This is unfortunately not really minor unless we have a well documented
> way to force this :(
It is not that different from blocking driver unbind while FDs are
open which a lot of places do in various ways?
Jason
Powered by blists - more mailing lists