projects
/
users
/
jedix
/
linux-maple.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24a0c12
)
mm/gup: use maple tree navigation instead of linked list
author
Liam R. Howlett <Liam.Howlett@Oracle.com>
Wed, 20 Jul 2022 02:17:59 +0000
(
02:17
+0000)
committer
akpm <akpm@linux-foundation.org>
Wed, 20 Jul 2022 21:41:41 +0000
(14:41 -0700)
Use find_vma_intersection() to locate the VMAs in __mm_populate() instead
of using find_vma() and the linked list.
Link:
https://lkml.kernel.org/r/20220504011345.662299-36-Liam.Howlett@oracle.com
Link:
https://lkml.kernel.org/r/20220621204632.3370049-52-Liam.Howlett@oracle.com
Link:
https://lkml.kernel.org/r/20220720021727.17018-52-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: David Howells <dhowells@redhat.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: SeongJae Park <sj@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Will Deacon <will@kernel.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: David Hildenbrand <david@redhat.com>
Cc: Hulk Robot <hulkci@huawei.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/gup.c
patch
|
blob
|
history
diff --git
a/mm/gup.c
b/mm/gup.c
index 79cb9fb1d889f752df85232b04d72b543f1cbd30..32d0ccfb17eac705f88a7df34c6c636a1e3f605f 100644
(file)
--- a/
mm/gup.c
+++ b/
mm/gup.c
@@
-1643,10
+1643,11
@@
int __mm_populate(unsigned long start, unsigned long len, int ignore_errors)
if (!locked) {
locked = 1;
mmap_read_lock(mm);
- vma = find_vma
(mm, nstart
);
+ vma = find_vma
_intersection(mm, nstart, end
);
} else if (nstart >= vma->vm_end)
- vma = vma->vm_next;
- if (!vma || vma->vm_start >= end)
+ vma = find_vma_intersection(mm, vma->vm_end, end);
+
+ if (!vma)
break;
/*
* Set [nstart; nend) to intersection of desired address