From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 12 Dec 2018 17:16:07 -0500 From: Jerome Glisse To: Matthew Wilcox Cc: Dan Williams , Jan Kara , John Hubbard , John Hubbard , Andrew Morton , Linux MM , tom@talpey.com, Al Viro , benve@cisco.com, Christoph Hellwig , Christopher Lameter , "Dalessandro, Dennis" , Doug Ledford , Jason Gunthorpe , Michal Hocko , Mike Marciniszyn , rcampbell@nvidia.com, Linux Kernel Mailing List , linux-fsdevel , "Weiny, Ira" Subject: Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions Message-ID: <20181212221607.GJ5037@redhat.com> References: <20181207191620.GD3293@redhat.com> <3c4d46c0-aced-f96f-1bf3-725d02f11b60@nvidia.com> <20181208022445.GA7024@redhat.com> <20181210102846.GC29289@quack2.suse.cz> <20181212150319.GA3432@redhat.com> <20181212213005.GE5037@redhat.com> <20181212215348.GF5037@redhat.com> <20181212221157.GL6830@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181212221157.GL6830@bombadil.infradead.org> Sender: owner-linux-mm@kvack.org List-ID: On Wed, Dec 12, 2018 at 02:11:57PM -0800, Matthew Wilcox wrote: > On Wed, Dec 12, 2018 at 04:53:49PM -0500, Jerome Glisse wrote: > > The mmu notifier i put forward is the emergency revoke ie last > > resort after driver have done everything it could to inform user- > > space and release the pages. So doing thing brutaly in it like > > reprogramming driver page table (which AFAIK is something you > > can do on any hardware wether the hardware will like it or not > > is a different question). > > You can't do it to an NVMe device. You submit the DMA addresses in > the command, and the device reads the command at submission time. > There's no way to change the DMA addresses for an in-flight command. But like for GPU you can wait for in flight commands right ? ie you can wait for the queue to be done. This is how GPU do GUP ie GUP submit commands to queue and wait in mmu notifier for queue to be done. CHeers, J�r�me