From patchwork Fri Jun 14 20:54:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Stancek X-Patchwork-Id: 1116273 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45QXsW6pFwz9s00 for ; Sat, 15 Jun 2019 06:54:21 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 019B5294AE3 for ; Fri, 14 Jun 2019 22:54:16 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [217.194.8.4]) by picard.linux.it (Postfix) with ESMTP id DD6F9294AB4 for ; Fri, 14 Jun 2019 22:54:14 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id 7A2371000A83 for ; Fri, 14 Jun 2019 22:54:10 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2F384308427E for ; Fri, 14 Jun 2019 20:54:11 +0000 (UTC) Received: from dustball.brq.redhat.com (unknown [10.43.17.163]) by smtp.corp.redhat.com (Postfix) with ESMTP id A6D2D5C29A for ; Fri, 14 Jun 2019 20:54:10 +0000 (UTC) From: Jan Stancek To: ltp@lists.linux.it Date: Fri, 14 Jun 2019 22:54:02 +0200 Message-Id: <67bee9aca637a86b8101b122d149094b50397553.1560545529.git.jstancek@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Fri, 14 Jun 2019 20:54:11 +0000 (UTC) X-Virus-Scanned: clamav-milter 0.99.2 at in-4.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_HELO_PASS,SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-4.smtp.seeweb.it Subject: [LTP] [PATCH 1/2] mtest06: tweak DISTANT_MMAP_SIZE X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "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 --- 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 #include @@ -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 */ From patchwork Fri Jun 14 20:54:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Stancek X-Patchwork-Id: 1116274 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45QXsb2G5gz9s00 for ; Sat, 15 Jun 2019 06:54:26 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 250BB294B57 for ; Fri, 14 Jun 2019 22:54:20 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [IPv6:2001:4b78:1:20::3]) by picard.linux.it (Postfix) with ESMTP id 8056A294B21 for ; Fri, 14 Jun 2019 22:54:17 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-3.smtp.seeweb.it (Postfix) with ESMTPS id E5EF91A00E06 for ; Fri, 14 Jun 2019 22:54:15 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AE24688302 for ; Fri, 14 Jun 2019 20:54:14 +0000 (UTC) Received: from dustball.brq.redhat.com (unknown [10.43.17.163]) by smtp.corp.redhat.com (Postfix) with ESMTP id 34F185C5DF for ; Fri, 14 Jun 2019 20:54:14 +0000 (UTC) From: Jan Stancek To: ltp@lists.linux.it Date: Fri, 14 Jun 2019 22:54:03 +0200 Message-Id: <5a3aa7c62c69fdd2de19adf97ec070cd87ba6ce8.1560545529.git.jstancek@redhat.com> In-Reply-To: <67bee9aca637a86b8101b122d149094b50397553.1560545529.git.jstancek@redhat.com> References: <67bee9aca637a86b8101b122d149094b50397553.1560545529.git.jstancek@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 14 Jun 2019 20:54:14 +0000 (UTC) X-Virus-Scanned: clamav-milter 0.99.2 at in-3.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_HELO_PASS,SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-3.smtp.seeweb.it Subject: [LTP] [PATCH 2/2] mtest06: fix timestamp in output X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Previous version assumed that each iteration is ~3 seconds long, even if it takes a lot longer. Signed-off-by: Jan Stancek --- 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); } }