Skip to contentSkip to conversation

+ pagewalk-add-walk_page_vma.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Feb 10, 2014

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: + pagewalk-add-walk_page_vma.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Mon, 10 Feb 2014 14:42:10 -0800

The patch titled
Subject: pagewalk: add walk_page_vma()
has been added to the -mm tree. Its filename is
pagewalk-add-walk_page_vma.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/pagewalk-add-walk_page_vma.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/pagewalk-add-walk_page_vma.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/SubmitChecklist when testing your code ***

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

------------------------------------------------------
From: Naoya Horiguchi <[email protected]>
Subject: pagewalk: add walk_page_vma()

Introduces walk_page_vma(), which is useful for the callers which want to walk over a given vma. It's used by later patches.

Cc Matt Mackall <[email protected]>
Cc Cliff Wickman <[email protected]>
Cc KOSAKI Motohiro <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc KAMEZAWA Hiroyuki <[email protected]>
Cc Michal Hocko <[email protected]>
Cc "Aneesh Kumar K.V" <[email protected]>
Cc Pavel Emelyanov <[email protected]>
Cc Rik van Riel <[email protected]>
Cc Kirill A. Shutemov <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>

---

 include/linux/mm.h |    1 +
 mm/pagewalk.c      |   18 ++++++++++++++++++
 2 files changed, 19 insertions(+)
include/linux/mm.h renamed from include/linux/mm.h~pagewalk-add-walk_page_vma +1 -0
diff -puN include/linux/mm.h~pagewalk-add-walk_page_vma include/linux/mm.h
@@ -1112,6 +1112,7 @@ struct mm_walk {
 
 int walk_page_range(unsigned long addr, unsigned long end,
 		struct mm_walk *walk);
+int walk_page_vma(struct vm_area_struct *vma, struct mm_walk *walk);
 void free_pgd_range(struct mmu_gather *tlb, unsigned long addr,
 		unsigned long end, unsigned long floor, unsigned long ceiling);
 int copy_page_range(struct mm_struct *dst, struct mm_struct *src,
mm/pagewalk.c renamed from mm/pagewalk.c~pagewalk-add-walk_page_vma +18 -0
diff -puN mm/pagewalk.c~pagewalk-add-walk_page_vma mm/pagewalk.c
@@ -334,3 +334,21 @@ int walk_page_range(unsigned long start,
 	} while (start = next, start < end);
 	return err;
 }
+
+int walk_page_vma(struct vm_area_struct *vma, struct mm_walk *walk)
+{
+	int err;
+
+	if (!walk->mm)
+		return -EINVAL;
+
+	VM_BUG_ON(!rwsem_is_locked(&walk->mm->mmap_sem));
+	VM_BUG_ON(!vma);
+	walk->vma = vma;
+	err = walk_page_test(vma->vm_start, vma->vm_end, walk);
+	if (skip_lower_level_walking(walk))
+		return 0;
+	if (err)
+		return err;
+	return __walk_page_range(vma->vm_start, vma->vm_end, walk);
+}

_

Patches currently in -mm which might be from [email protected] are

mm-memory-failurec-move-refcount-only-in-mf_count_increased.patch mm-hugetlb-unify-region-structure-handling.patch mm-hugetlb-improve-cleanup-resv_map-parameters.patch mm-hugetlb-fix-race-in-region-tracking.patch mm-hugetlb-remove-resv_map_put.patch mm-hugetlb-use-vma_resv_map-map-types.patch mm-hugetlb-improve-page-fault-scalability.patch mm-hugetlb-improve-page-fault-scalability-fix.patch pagewalk-update-page-table-walker-core.patch pagewalk-add-walk_page_vma.patch smaps-redefine-callback-functions-for-page-table-walker.patch clear_refs-redefine-callback-functions-for-page-table-walker.patch pagemap-redefine-callback-functions-for-page-table-walker.patch numa_maps-redefine-callback-functions-for-page-table-walker.patch memcg-redefine-callback-functions-for-page-table-walker.patch madvise-redefine-callback-functions-for-page-table-walker.patch arch-powerpc-mm-subpage-protc-use-walk_page_vma-instead-of-walk_page_range.patch pagewalk-remove-argument-hmask-from-hugetlb_entry.patch mempolicy-apply-page-table-walker-on-queue_pages_range.patch