Re: [PATCH v2 hmm 03/11] mm/hmm: Hold a mmgrab from hmm to mm

2019-06-10 Thread Ira Weiny
On Thu, Jun 06, 2019 at 03:44:30PM -0300, Jason Gunthorpe wrote: > From: Jason Gunthorpe > > So long a a struct hmm pointer exists, so should the struct mm it is > linked too. Hold the mmgrab() as soon as a hmm is created, and mmdrop() it > once the hmm refcount goes to zero. > > Since mmdrop()

Re: [PATCH v2 hmm 03/11] mm/hmm: Hold a mmgrab from hmm to mm

2019-06-07 Thread Jason Gunthorpe
On Fri, Jun 07, 2019 at 11:41:20AM -0700, Ralph Campbell wrote: > > On 6/6/19 11:44 AM, Jason Gunthorpe wrote: > > From: Jason Gunthorpe > > > > So long a a struct hmm pointer exists, so should the struct mm it is > > s/a a/as a/ Got it, thanks Jason __

Re: [PATCH v2 hmm 03/11] mm/hmm: Hold a mmgrab from hmm to mm

2019-06-07 Thread Ralph Campbell
On 6/6/19 11:44 AM, Jason Gunthorpe wrote: From: Jason Gunthorpe So long a a struct hmm pointer exists, so should the struct mm it is s/a a/as a/ linked too. Hold the mmgrab() as soon as a hmm is created, and mmdrop() it once the hmm refcount goes to zero. Since mmdrop() (ie a 0 kref on s

Re: [PATCH v2 hmm 03/11] mm/hmm: Hold a mmgrab from hmm to mm

2019-06-07 Thread Jason Gunthorpe
On Thu, Jun 06, 2019 at 07:44:58PM -0700, John Hubbard wrote: > On 6/6/19 11:44 AM, Jason Gunthorpe wrote: > > From: Jason Gunthorpe > > > > So long a a struct hmm pointer exists, so should the struct mm it is > > linked too. Hold the mmgrab() as soon as a hmm is created, and mmdrop() it > > once

Re: [PATCH v2 hmm 03/11] mm/hmm: Hold a mmgrab from hmm to mm

2019-06-06 Thread John Hubbard
On 6/6/19 11:44 AM, Jason Gunthorpe wrote: > From: Jason Gunthorpe > > So long a a struct hmm pointer exists, so should the struct mm it is > linked too. Hold the mmgrab() as soon as a hmm is created, and mmdrop() it > once the hmm refcount goes to zero. > > Since mmdrop() (ie a 0 kref on struct

[PATCH v2 hmm 03/11] mm/hmm: Hold a mmgrab from hmm to mm

2019-06-06 Thread Jason Gunthorpe
From: Jason Gunthorpe So long a a struct hmm pointer exists, so should the struct mm it is linked too. Hold the mmgrab() as soon as a hmm is created, and mmdrop() it once the hmm refcount goes to zero. Since mmdrop() (ie a 0 kref on struct mm) is now impossible with a !NULL mm->hmm delete the hm