[PATCH hmm 8/8] mm/hmm: add missing call to hmm_pte_need_fault in HMM_PFN_SPECIAL handling
Jason Gunthorpe
jgg at mellanox.com
Mon Mar 16 13:04:58 UTC 2020
On Mon, Mar 16, 2020 at 01:49:53PM +0100, Christoph Hellwig wrote:
> On Mon, Mar 16, 2020 at 09:10:53AM -0300, Jason Gunthorpe wrote:
> > On Mon, Mar 16, 2020 at 10:13:47AM +0100, Christoph Hellwig wrote:
> > > On Wed, Mar 11, 2020 at 03:35:06PM -0300, Jason Gunthorpe wrote:
> > > > From: Jason Gunthorpe <jgg at mellanox.com>
> > > >
> > > > Currently if a special PTE is encountered hmm_range_fault() immediately
> > > > returns EFAULT and sets the HMM_PFN_SPECIAL error output (which nothing
> > > > uses).
> > > >
> > > > EFAULT should only be returned after testing with hmm_pte_need_fault().
> > > >
> > > > Also pte_devmap() and pte_special() are exclusive, and there is no need to
> > > > check IS_ENABLED, pte_special() is stubbed out to return false on
> > > > unsupported architectures.
> > >
> > > I think the right fix is to just kill HMM_PFN_SPECIAL and treat any
> > > fault on special ptes that aren't the zero page as an error.
> >
> > I have another series that is doing that - this change is to make the
> > next series make sense and not introduce new control logic too.
>
> Ok. I had some cleanups like this based of older trees, but if you are
> active in this area I think I'll let you handle it.
You once said you wanted to loose the weird pfn flags scheme, so
before putting hmm_range_fault in ODP I planned to do that.
If you have your series someplace send me a URL and I'll look on it
Thanks,
Jason
More information about the amd-gfx
mailing list