mm/hmm: support automatic NUMA balancing
authorPhilip Yang <Philip.Yang@amd.com>
Thu, 23 May 2019 20:32:31 +0000 (16:32 -0400)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 6 Jun 2019 19:31:41 +0000 (16:31 -0300)
commit789c2af88f24d1db983aae49b5c4561e6e02ff5b
treef48479dc50289b0380b239bcc60e0fcd216bc559
parent085ea25064a9169eba5f2ed6484c111ab0f3ee79
mm/hmm: support automatic NUMA balancing

While the page is migrating by NUMA balancing, HMM failed to detect this
condition and still return the old page. Application will use the new page
migrated, but driver pass the old page physical address to GPU, this crash
the application later.

Use pte_protnone(pte) to return this condition and then hmm_vma_do_fault
will allocate new page.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Jérôme Glisse <jglisse@redhat.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
mm/hmm.c