mtest06: tweak DISTANT_MMAP_SIZE
PATCH 1/2 mtest06: tweak DISTANT_MMAP_SIZE
Allocating further away works as a better reproducer for:
7a30df49f63a ("mm: mmu_gather: remove __tlb_reset_range() for force flush")
Signed-off-by Jan Stancek <[email protected]>
--- testcases/kernel/mem/mtest06/mmap1.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
testcases/kernel/mem/mtest06/mmap1.c +9 -2
@@ -12,8 +12,11 @@* between mmap/munmap worked, then its value must match expected * value. * -* Can trigger panics/stalls since at least 4.14 on some arches. See: +* Can trigger panics/stalls since at least 4.14 on some arches: * fc8efd2ddfed ("mm/memory.c: do_fault: avoid usage of stale vm_area_struct") +* Can trigger user-space stalls on aarch64: +* 7a30df49f63a ("mm: mmu_gather: remove __tlb_reset_range() for force flush") +* https://lore.kernel.org/linux-mm/[email protected] */ #include <errno.h> #include <float.h>
@@ -25,7 +28,11 @@#include "tst_test.h" #include "tst_safe_pthread.h" -#define DISTANT_MMAP_SIZE (64*1024*1024) +#ifdef TST_ABI32 +# define DISTANT_MMAP_SIZE (256*1024*1024) +#else +# define DISTANT_MMAP_SIZE (2L*1024*1024*1024) +#endif #define TEST_FILENAME "ashfile"/* seconds remaining before reaching timeout */
Signature · 1 line
1.8.3.1
PATCH 2/2 mtest06: fix timestamp in output
Previous version assumed that each iteration is ~3 seconds long, even if it takes a lot longer.
Signed-off-by Jan Stancek <[email protected]>
--- testcases/kernel/mem/mtest06/mmap1.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)
testcases/kernel/mem/mtest06/mmap1.c +11 -10
@@ -218,9 +218,9 @@ static void setup(void)static void run (void ) {pthread_t thid[2 ]; -int remaining =tst_timeout_remaining (); -int elapsed =0 ; +int start, last_update; + start = last_update =tst_timeout_remaining ();while (tst_timeout_remaining () >STOP_THRESHOLD ) {int fd =mkfile (file_size);
@@ -236,14 +236,15 @@ static void run(void)close (fd); -if (remaining -tst_timeout_remaining () >PROGRESS_SEC ) { - remaining =tst_timeout_remaining (); - elapsed +=PROGRESS_SEC ; -tst_res (TINFO ,"[%d] mapped: %lu, sigsegv hit: %lu, " -"threads spawned: %lu" , elapsed, map_count, - mapped_sigsegv_count, threads_spawned); -tst_res (TINFO ,"[%d] repeated_reads: %ld, " -"data_matched: %lu" , elapsed, repeated_reads, +if (last_update -tst_timeout_remaining () >=PROGRESS_SEC ) { + last_update =tst_timeout_remaining (); +tst_res (TINFO ,"[%03d] mapped: %lu, sigsegv hit: %lu, " +"threads spawned: %lu" , + start -tst_timeout_remaining (), + map_count, mapped_sigsegv_count, + threads_spawned); +tst_res (TINFO ," repeated_reads: %ld, " +"data_matched: %lu" , repeated_reads, data_matched); } }
Signature · 1 line
1.8.3.1
PATCH 2/2 mtest06: fix timestamp in output
Hi!
Looks good as well, acked.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/2 mtest06: tweak DISTANT_MMAP_SIZE
In reply to Jan StancekHi!
Looks ok, acked.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/2 mtest06: tweak DISTANT_MMAP_SIZE
----- Original Message -----
Quoted 2 lines
Hi!
Looks ok, acked.
Both pushed.
Quoted 5 lines
--
Cyril Hrubis
[email protected]