+ mm-hmm-mirror-hugetlbfs-snapshoting-faulting-and-dma-mapping-v3-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm/hmm: fix initial PFN for hugetlbfs pages
has been added to the -mm tree.  Its filename is
     mm-hmm-mirror-hugetlbfs-snapshoting-faulting-and-dma-mapping-v3-fix.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-hmm-mirror-hugetlbfs-snapshoting-faulting-and-dma-mapping-v3-fix.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-hmm-mirror-hugetlbfs-snapshoting-faulting-and-dma-mapping-v3-fix.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Ralph Campbell <rcampbell@xxxxxxxxxx>
Subject: mm/hmm: fix initial PFN for hugetlbfs pages

The mmotm patch [1] adds hugetlbfs support for HMM but the initial PFN
used to fill the HMM range->pfns[] array doesn't properly compute the
starting PFN offset.  This can be tested by running test-hugetlbfs-read
from [2].

Fix the PFN offset by adjusting the page offset by the device's page size.

[1] https://marc.info/?l=linux-mm&m=155432003506068&w=2
("mm/hmm: mirror hugetlbfs (snapshoting, faulting and DMA mapping)")
[2] https://gitlab.freedesktop.org/glisse/svm-cl-tests

Link: http://lkml.kernel.org/r/20190419233536.8080-1-rcampbell@xxxxxxxxxx
Signed-off-by: Ralph Campbell <rcampbell@xxxxxxxxxx>
Reviewed-by: Jérôme Glisse <jglisse@xxxxxxxxxx>
Cc: Ira Weiny <ira.weiny@xxxxxxxxx>
Cc: John Hubbard <jhubbard@xxxxxxxxxx>
Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Balbir Singh <bsingharora@xxxxxxxxx>
Cc: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>
Cc: Souptick Joarder <jrdr.linux@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/hmm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/hmm.c~mm-hmm-mirror-hugetlbfs-snapshoting-faulting-and-dma-mapping-v3-fix
+++ a/mm/hmm.c
@@ -755,7 +755,7 @@ static int hmm_vma_walk_hugetlb_entry(pt
 		goto unlock;
 	}
 
-	pfn = pte_pfn(entry) + (start & mask);
+	pfn = pte_pfn(entry) + ((start & mask) >> range->page_shift);
 	for (; addr < end; addr += size, i++, pfn += pfn_inc)
 		range->pfns[i] = hmm_pfn_from_pfn(range, pfn) | cpu_flags;
 	hmm_vma_walk->last = end;
_

Patches currently in -mm which might be from rcampbell@xxxxxxxxxx are

mm-hmm-mirror-hugetlbfs-snapshoting-faulting-and-dma-mapping-v3-fix.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux