* Re: [LTP] [PATCH] mm: as the same logic with queue_pages_range
[not found] <20230906061902.591996-1-eadavis@sina.com>
@ 2023-09-12 5:20 ` kernel test robot
2023-09-13 9:10 ` Cyril Hrubis
2023-09-14 5:53 ` [LTP] [PATCH] mm: extpand queue_pages_range() to find and lock the vma range Edward AD
0 siblings, 2 replies; 3+ messages in thread
From: kernel test robot @ 2023-09-12 5:20 UTC (permalink / raw)
To: Edward AD
Cc: syzbot+b591856e0f0139f83023, lkp, syzkaller-bugs, linux-kernel,
linux-mm, oliver.sang, oe-lkp, akpm, ltp
Hello,
kernel test robot noticed "ltp.vma02.fail" on:
commit: 8dfdaf99160833af1a0a4ffef60c94627c77025b ("[PATCH] mm: as the same logic with queue_pages_range")
url: https://github.com/intel-lab-lkp/linux/commits/Edward-AD/mm-as-the-same-logic-with-queue_pages_range/20230906-142110
base: https://git.kernel.org/cgit/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/all/20230906061902.591996-1-eadavis@sina.com/
patch subject: [PATCH] mm: as the same logic with queue_pages_range
in testcase: ltp
version: ltp-x86_64-14c1f76-1_20230715
with following parameters:
disk: 1HDD
test: mm-00/vma02
compiler: gcc-12
test machine: 8 threads 1 sockets Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz (Kaby Lake) with 32G memory
(please refer to attached dmesg/kmsg for entire log/backtrace)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <oliver.sang@intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202309121302.8864096c-oliver.sang@intel.com
Running tests.......
<<<test_start>>>
tag=vma02 stime=1694438526
cmdline="vma02"
contacts=""
analysis=exit
<<<test_output>>>
vma02 0 TINFO : pid = 3639 addr = 0x7f5202dd6000
vma02 0 TINFO : start = 0x7f5202dd6000, end = 0x7f5202dd7000
vma02 0 TINFO : start = 0x7f5202dd7000, end = 0x7f5202dd8000
vma02 0 TINFO : start = 0x7f5202dd8000, end = 0x7f5202dd9000
vma02 1 TFAIL : vma02.c:144: >1 unmerged VMAs.
incrementing stop
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no
cutime=0 cstime=7
<<<test_end>>>
INFO: ltp-pan reported some tests FAIL
LTP Version: 20230516-75-g2e582e743
###############################################################
Done executing testcases.
LTP Version: 20230516-75-g2e582e743
###############################################################
The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20230912/202309121302.8864096c-oliver.sang@intel.com
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH] mm: as the same logic with queue_pages_range
2023-09-12 5:20 ` [LTP] [PATCH] mm: as the same logic with queue_pages_range kernel test robot
@ 2023-09-13 9:10 ` Cyril Hrubis
2023-09-14 5:53 ` [LTP] [PATCH] mm: extpand queue_pages_range() to find and lock the vma range Edward AD
1 sibling, 0 replies; 3+ messages in thread
From: Cyril Hrubis @ 2023-09-13 9:10 UTC (permalink / raw)
To: kernel test robot
Cc: syzbot+b591856e0f0139f83023, lkp, syzkaller-bugs, linux-kernel,
linux-mm, oe-lkp, akpm, ltp, Edward AD
Hi!
> Running tests.......
> <<<test_start>>>
> tag=vma02 stime=1694438526
> cmdline="vma02"
> contacts=""
> analysis=exit
> <<<test_output>>>
> vma02 0 TINFO : pid = 3639 addr = 0x7f5202dd6000
> vma02 0 TINFO : start = 0x7f5202dd6000, end = 0x7f5202dd7000
> vma02 0 TINFO : start = 0x7f5202dd7000, end = 0x7f5202dd8000
> vma02 0 TINFO : start = 0x7f5202dd8000, end = 0x7f5202dd9000
> vma02 1 TFAIL : vma02.c:144: >1 unmerged VMAs.
> incrementing stop
So the test is reproducer for:
commit 9d8cebd4bcd7c3878462fdfda34bbcdeb4df7ef4
Author: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Date: Fri Mar 5 13:41:57 2010 -0800
mm: fix mbind vma merge problem
Strangely, current mbind() doesn't merge vma with neighbor vma although it's possible.
Unfortunately, many vma can reduce performance...
And what the test does is:
- map 3 continous pages
- popluate
- mbind() first page
- mbind() all three pages
- checks that there is only single VMA for the pages after second
mbind()
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 3+ messages in thread
* [LTP] [PATCH] mm: extpand queue_pages_range() to find and lock the vma range
2023-09-12 5:20 ` [LTP] [PATCH] mm: as the same logic with queue_pages_range kernel test robot
2023-09-13 9:10 ` Cyril Hrubis
@ 2023-09-14 5:53 ` Edward AD
1 sibling, 0 replies; 3+ messages in thread
From: Edward AD @ 2023-09-14 5:53 UTC (permalink / raw)
To: oliver.sang
Cc: syzbot+b591856e0f0139f83023, lkp, syzkaller-bugs, linux-kernel,
linux-mm, oe-lkp, akpm, ltp, eadavis
Using for_each_vma_range to find vmas, and not only inside locking, but also
outside locking to ensure that vma_start_write are performed.
Reported-and-tested-by: syzbot+b591856e0f0139f83023@syzkaller.appspotmail.com
Signed-off-by: Edward AD <eadavis@sina.com>
---
mm/pagewalk.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/mm/pagewalk.c b/mm/pagewalk.c
index b7d7e4fcfad7..b31d59a27f57 100644
--- a/mm/pagewalk.c
+++ b/mm/pagewalk.c
@@ -479,6 +479,7 @@ int walk_page_range(struct mm_struct *mm, unsigned long start,
.mm = mm,
.private = private,
};
+ struct vma_iterator vmi;
if (start >= end)
return -EINVAL;
@@ -488,8 +489,9 @@ int walk_page_range(struct mm_struct *mm, unsigned long start,
process_mm_walk_lock(walk.mm, ops->walk_lock);
- vma = find_vma(walk.mm, start);
- do {
+ vma_iter_init(&vmi, walk.mm, start);
+ for_each_vma_range(vmi, vma, end) {
+ process_vma_walk_lock(vma, ops->walk_lock);
if (!vma) { /* after the last vma */
walk.vma = NULL;
next = end;
@@ -501,10 +503,8 @@ int walk_page_range(struct mm_struct *mm, unsigned long start,
if (ops->pte_hole)
err = ops->pte_hole(start, next, -1, &walk);
} else { /* inside vma */
- process_vma_walk_lock(vma, ops->walk_lock);
walk.vma = vma;
next = min(end, vma->vm_end);
- vma = find_vma(mm, vma->vm_end);
err = walk_page_test(start, next, &walk);
if (err > 0) {
@@ -522,7 +522,7 @@ int walk_page_range(struct mm_struct *mm, unsigned long start,
}
if (err)
break;
- } while (start = next, start < end);
+ };
return err;
}
--
2.25.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-14 12:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230906061902.591996-1-eadavis@sina.com>
2023-09-12 5:20 ` [LTP] [PATCH] mm: as the same logic with queue_pages_range kernel test robot
2023-09-13 9:10 ` Cyril Hrubis
2023-09-14 5:53 ` [LTP] [PATCH] mm: extpand queue_pages_range() to find and lock the vma range Edward AD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox