Re: [PATCH] mm/hmm: replace hmm_update with mmu_notifier_range

2019-07-26 Thread Ralph Campbell
On 7/24/19 6:14 PM, Jason Gunthorpe wrote: On Tue, Jul 23, 2019 at 02:05:06PM -0700, Ralph Campbell wrote: The hmm_mirror_ops callback function sync_cpu_device_pagetables() passes a struct hmm_update which is a simplified version of struct mmu_notifier_range. This is unnecessary so replace

Re: [PATCH] mm/hmm: replace hmm_update with mmu_notifier_range

2019-07-25 Thread Jason Gunthorpe
On Tue, Jul 23, 2019 at 02:05:06PM -0700, Ralph Campbell wrote: > The hmm_mirror_ops callback function sync_cpu_device_pagetables() passes > a struct hmm_update which is a simplified version of struct > mmu_notifier_range. This is unnecessary so replace hmm_update with > mmu_notifier_range

Re: [PATCH] mm/hmm: replace hmm_update with mmu_notifier_range

2019-07-25 Thread Jason Gunthorpe
On Wed, Jul 24, 2019 at 08:59:10PM +0200, Michal Hocko wrote: > On Wed 24-07-19 20:56:17, Michal Hocko wrote: > > On Wed 24-07-19 15:08:37, Jason Gunthorpe wrote: > > > On Wed, Jul 24, 2019 at 07:58:58PM +0200, Michal Hocko wrote: > > [...] > > > > Maybe new users have started relying on a new

Re: [PATCH] mm/hmm: replace hmm_update with mmu_notifier_range

2019-07-25 Thread Jason Gunthorpe
On Wed, Jul 24, 2019 at 09:05:53AM +0200, Christoph Hellwig wrote: > Looks good: > > Reviewed-by: Christoph Hellwig > > One comment on a related cleanup: > > > list_for_each_entry(mirror, >mirrors, list) { > > int rc; > > > > - rc =

Re: [PATCH] mm/hmm: replace hmm_update with mmu_notifier_range

2019-07-25 Thread Jason Gunthorpe
On Wed, Jul 24, 2019 at 05:33:05PM +0200, Christoph Hellwig wrote: > On Wed, Jul 24, 2019 at 12:28:58PM -0300, Jason Gunthorpe wrote: > > Humm. Actually having looked this some more, I wonder if this is a > > problem: > > What a mess. > > Question: do we even care for the non-blocking events?

Re: [PATCH] mm/hmm: replace hmm_update with mmu_notifier_range

2019-07-25 Thread Jason Gunthorpe
On Wed, Jul 24, 2019 at 09:48:55PM +0200, Christoph Hellwig wrote: > On Wed, Jul 24, 2019 at 04:21:55PM -0300, Jason Gunthorpe wrote: > > If we change the register to keep the hlist sorted by address then we > > can do a targetted 'undo' of past starts terminated by address > > less-than

Re: [PATCH] mm/hmm: replace hmm_update with mmu_notifier_range

2019-07-25 Thread Jason Gunthorpe
On Wed, Jul 24, 2019 at 07:58:58PM +0200, Michal Hocko wrote: > On Wed 24-07-19 12:28:58, Jason Gunthorpe wrote: > > On Wed, Jul 24, 2019 at 09:05:53AM +0200, Christoph Hellwig wrote: > > > Looks good: > > > > > > Reviewed-by: Christoph Hellwig > > > > > > One comment on a related cleanup: > >

Re: [PATCH] mm/hmm: replace hmm_update with mmu_notifier_range

2019-07-24 Thread Michal Hocko
On Wed 24-07-19 20:56:17, Michal Hocko wrote: > On Wed 24-07-19 15:08:37, Jason Gunthorpe wrote: > > On Wed, Jul 24, 2019 at 07:58:58PM +0200, Michal Hocko wrote: > [...] > > > Maybe new users have started relying on a new semantic in the meantime, > > > back then, none of the notifier has even

Re: [PATCH] mm/hmm: replace hmm_update with mmu_notifier_range

2019-07-24 Thread Michal Hocko
On Wed 24-07-19 15:08:37, Jason Gunthorpe wrote: > On Wed, Jul 24, 2019 at 07:58:58PM +0200, Michal Hocko wrote: [...] > > Maybe new users have started relying on a new semantic in the meantime, > > back then, none of the notifier has even started any action in blocking > > mode on a EAGAIN

Re: [PATCH] mm/hmm: replace hmm_update with mmu_notifier_range

2019-07-24 Thread Michal Hocko
On Wed 24-07-19 17:33:05, Christoph Hellwig wrote: > On Wed, Jul 24, 2019 at 12:28:58PM -0300, Jason Gunthorpe wrote: > > Humm. Actually having looked this some more, I wonder if this is a > > problem: > > What a mess. > > Question: do we even care for the non-blocking events? The only place >

Re: [PATCH] mm/hmm: replace hmm_update with mmu_notifier_range

2019-07-24 Thread Michal Hocko
On Wed 24-07-19 12:28:58, Jason Gunthorpe wrote: > On Wed, Jul 24, 2019 at 09:05:53AM +0200, Christoph Hellwig wrote: > > Looks good: > > > > Reviewed-by: Christoph Hellwig > > > > One comment on a related cleanup: > > > > > list_for_each_entry(mirror, >mirrors, list) { > > > int

[PATCH] mm/hmm: replace hmm_update with mmu_notifier_range

2019-07-24 Thread Ralph Campbell
The hmm_mirror_ops callback function sync_cpu_device_pagetables() passes a struct hmm_update which is a simplified version of struct mmu_notifier_range. This is unnecessary so replace hmm_update with mmu_notifier_range directly. Signed-off-by: Ralph Campbell Cc: "Jérôme Glisse" Cc: Jason