From: Jason Gunthorpe Date: Fri, 19 Feb 2021 14:01:05 +0000 Subject: Re: [PATCH v2 1/4] hmm: Device exclusive memory access Message-Id: <20210219140105.GE2643399@ziepe.ca> List-Id: References: <20210219020750.16444-1-apopple@nvidia.com> <20210219020750.16444-2-apopple@nvidia.com> <20210219094741.GA641389@infradead.org> In-Reply-To: <20210219094741.GA641389@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Christoph Hellwig Cc: Alistair Popple , linux-mm@kvack.org, nouveau@lists.freedesktop.org, bskeggs@redhat.com, akpm@linux-foundation.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org, dri-devel@lists.freedesktop.org, jhubbard@nvidia.com, rcampbell@nvidia.com, jglisse@redhat.com, daniel@ffwll.ch On Fri, Feb 19, 2021 at 09:47:41AM +0000, Christoph Hellwig wrote: > > diff --git a/include/linux/hmm.h b/include/linux/hmm.h > > index 866a0fa104c4..5d28ff6d4d80 100644 > > +++ b/include/linux/hmm.h > > @@ -109,6 +109,10 @@ struct hmm_range { > > */ > > int hmm_range_fault(struct hmm_range *range); > > > > +int hmm_exclusive_range(struct mm_struct *mm, unsigned long start, > > + unsigned long end, struct page **pages); > > +vm_fault_t hmm_remove_exclusive_entry(struct vm_fault *vmf); > > Can we avoid the hmm naming for new code (we should probably also kill > it off for the existing code)? Yes please, I'd prefer it if hmm.c was just the special page walker and not a grab bag of unrelated things Is there is a more natural place to put this in the mm for this idea? Jason