* [LTP] [PATCH 1/2] mtest06: tweak DISTANT_MMAP_SIZE
@ 2019-06-14 20:54 Jan Stancek
2019-06-14 20:54 ` [LTP] [PATCH 2/2] mtest06: fix timestamp in output Jan Stancek
2019-06-19 14:43 ` [LTP] [PATCH 1/2] mtest06: tweak DISTANT_MMAP_SIZE Cyril Hrubis
0 siblings, 2 replies; 5+ messages in thread
From: Jan Stancek @ 2019-06-14 20:54 UTC (permalink / raw)
To: ltp
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 <jstancek@redhat.com>
---
testcases/kernel/mem/mtest06/mmap1.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/testcases/kernel/mem/mtest06/mmap1.c b/testcases/kernel/mem/mtest06/mmap1.c
index b7b742653114..50d2dafbd952 100644
--- a/testcases/kernel/mem/mtest06/mmap1.c
+++ b/testcases/kernel/mem/mtest06/mmap1.c
@@ -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/1817839533.20996552.1557065445233.JavaMail.zimbra@redhat.com
*/
#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 */
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [LTP] [PATCH 2/2] mtest06: fix timestamp in output
2019-06-14 20:54 [LTP] [PATCH 1/2] mtest06: tweak DISTANT_MMAP_SIZE Jan Stancek
@ 2019-06-14 20:54 ` Jan Stancek
2019-06-19 14:46 ` Cyril Hrubis
2019-06-19 14:43 ` [LTP] [PATCH 1/2] mtest06: tweak DISTANT_MMAP_SIZE Cyril Hrubis
1 sibling, 1 reply; 5+ messages in thread
From: Jan Stancek @ 2019-06-14 20:54 UTC (permalink / raw)
To: ltp
Previous version assumed that each iteration is ~3 seconds long,
even if it takes a lot longer.
Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
testcases/kernel/mem/mtest06/mmap1.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/testcases/kernel/mem/mtest06/mmap1.c b/testcases/kernel/mem/mtest06/mmap1.c
index 50d2dafbd952..e16357e3c795 100644
--- a/testcases/kernel/mem/mtest06/mmap1.c
+++ b/testcases/kernel/mem/mtest06/mmap1.c
@@ -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);
}
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [LTP] [PATCH 1/2] mtest06: tweak DISTANT_MMAP_SIZE
2019-06-14 20:54 [LTP] [PATCH 1/2] mtest06: tweak DISTANT_MMAP_SIZE Jan Stancek
2019-06-14 20:54 ` [LTP] [PATCH 2/2] mtest06: fix timestamp in output Jan Stancek
@ 2019-06-19 14:43 ` Cyril Hrubis
2019-06-20 7:39 ` Jan Stancek
1 sibling, 1 reply; 5+ messages in thread
From: Cyril Hrubis @ 2019-06-19 14:43 UTC (permalink / raw)
To: ltp
Hi!
Looks ok, acked.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] [PATCH 2/2] mtest06: fix timestamp in output
2019-06-14 20:54 ` [LTP] [PATCH 2/2] mtest06: fix timestamp in output Jan Stancek
@ 2019-06-19 14:46 ` Cyril Hrubis
0 siblings, 0 replies; 5+ messages in thread
From: Cyril Hrubis @ 2019-06-19 14:46 UTC (permalink / raw)
To: ltp
Hi!
Looks good as well, acked.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LTP] [PATCH 1/2] mtest06: tweak DISTANT_MMAP_SIZE
2019-06-19 14:43 ` [LTP] [PATCH 1/2] mtest06: tweak DISTANT_MMAP_SIZE Cyril Hrubis
@ 2019-06-20 7:39 ` Jan Stancek
0 siblings, 0 replies; 5+ messages in thread
From: Jan Stancek @ 2019-06-20 7:39 UTC (permalink / raw)
To: ltp
----- Original Message -----
> Hi!
> Looks ok, acked.
Both pushed.
>
> --
> Cyril Hrubis
> chrubis@suse.cz
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-06-20 7:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-14 20:54 [LTP] [PATCH 1/2] mtest06: tweak DISTANT_MMAP_SIZE Jan Stancek
2019-06-14 20:54 ` [LTP] [PATCH 2/2] mtest06: fix timestamp in output Jan Stancek
2019-06-19 14:46 ` Cyril Hrubis
2019-06-19 14:43 ` [LTP] [PATCH 1/2] mtest06: tweak DISTANT_MMAP_SIZE Cyril Hrubis
2019-06-20 7:39 ` Jan Stancek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox