* + mglru-vs-maple-tree-fix.patch added to -mm tree
@ 2022-04-19 18:32 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-04-19 18:32 UTC (permalink / raw)
To: mm-commits, yuzhao, Liam.Howlett, liam.howlett, akpm
The patch titled
Subject: mm/vmscan: Use VMA_ITERATOR in get_next_vma()
has been added to the -mm tree. Its filename is
mglru-vs-maple-tree-fix.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mglru-vs-maple-tree-fix.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mglru-vs-maple-tree-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: Liam Howlett <liam.howlett@oracle.com>
Subject: mm/vmscan: Use VMA_ITERATOR in get_next_vma()
The next vma may actually be many VMAs away, so use the VMA_ITERATOR to
continue searching from vm_end onwards.
Link: https://lkml.kernel.org/r/20220419174757.2tptlbkebiletmck@revolver
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Yu Zhao <yuzhao@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/vmscan.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
--- a/mm/vmscan.c~mglru-vs-maple-tree-fix
+++ a/mm/vmscan.c
@@ -3697,24 +3697,21 @@ static bool get_next_vma(struct mm_walk
unsigned long *start, unsigned long *end)
{
unsigned long next = round_up(*end, size);
+ VMA_ITERATOR(vmi, walk->mm, walk->vma->vm_end)
VM_BUG_ON(mask & size);
VM_BUG_ON(*start >= *end);
VM_BUG_ON((next & mask) != (*start & mask));
- while (walk->vma) {
- if (next >= walk->vma->vm_end) {
- walk->vma = find_vma(walk->mm, walk->vma->vm_end);
+ for_each_mte_vma(vmi, walk->vma) {
+ if (next >= walk->vma->vm_end)
continue;
- }
if ((next & mask) != (walk->vma->vm_start & mask))
return false;
- if (should_skip_vma(walk->vma->vm_start, walk->vma->vm_end, walk)) {
- walk->vma = find_vma(walk->mm, walk->vma->vm_end);
+ if (should_skip_vma(walk->vma->vm_start, walk->vma->vm_end, walk))
continue;
- }
*start = max(next, walk->vma->vm_start);
next = (next | ~mask) + 1;
_
Patches currently in -mm which might be from liam.howlett@oracle.com are
radix-tree-test-suite-add-lockdep_is_held-to-header.patch
mips-rename-mt_init-to-mips_mt_init.patch
lib-test_maple_tree-add-testing-for-maple-tree.patch
mmap-change-zeroing-of-maple-tree-in-__vma_adjust.patch
riscv-use-vma-iterator-for-vdso.patch
mm-mmapc-pass-in-mapping-to-__vma_link_file.patch
mglru-vs-maple-tree-fix.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-19 18:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-19 18:32 + mglru-vs-maple-tree-fix.patch added to -mm tree Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).