From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AD09C433E7 for ; Sat, 17 Oct 2020 23:14:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 124F320878 for ; Sat, 17 Oct 2020 23:14:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="EmRDwEgZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 124F320878 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A83986B008A; Sat, 17 Oct 2020 19:14:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A337E6B008C; Sat, 17 Oct 2020 19:14:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8D54B6B0092; Sat, 17 Oct 2020 19:14:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0116.hostedemail.com [216.40.44.116]) by kanga.kvack.org (Postfix) with ESMTP id 6068D6B008A for ; Sat, 17 Oct 2020 19:14:49 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 0B22B181AEF07 for ; Sat, 17 Oct 2020 23:14:49 +0000 (UTC) X-FDA: 77382974298.02.knot52_07048ea27229 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin02.hostedemail.com (Postfix) with ESMTP id DBCEB101E2D3A for ; Sat, 17 Oct 2020 23:14:48 +0000 (UTC) X-HE-Tag: knot52_07048ea27229 X-Filterd-Recvd-Size: 2712 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Sat, 17 Oct 2020 23:14:48 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8CBA3212CC; Sat, 17 Oct 2020 23:14:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602976487; bh=25RfhTqr2Jfw6P3r6zDykxyPWbiJknJ7qwh27f3yQic=; h=Date:From:To:Subject:In-Reply-To:From; b=EmRDwEgZvAUwkCRkYXY55983hD7TvnkRXlNWpLbwzSl4v+Le3P6he8EmejHQiJAs2 nyGFbRwmRaLQwIGd+Zo8njT+KV5i1Befpyzw6oxT5coCTexTJ/pXddxDOvxBjlSWvx Y+C6HhiEgjQGyFDgjAN8cjYK997CjwJjtJrLu7ok= Date: Sat, 17 Oct 2020 16:14:47 -0700 From: Andrew Morton To: akpm@linux-foundation.org, jhubbard@nvidia.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, rcampbell@nvidia.com, shuah@kernel.org, sj38.park@gmail.com, torvalds@linux-foundation.org Subject: [patch 23/40] selftests/vm: 10x speedup for hmm-tests Message-ID: <20201017231447.uw23bzJ9_%akpm@linux-foundation.org> In-Reply-To: <20201017161314.88890b87fae7446ccc13c902@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: John Hubbard Subject: selftests/vm: 10x speedup for hmm-tests This patch reduces the running time for hmm-tests from about 10+ seconds, to just under 1.0 second, for an approximately 10x speedup. That brings it in line with most of the other tests in selftests/vm, which mostly run in < 1 sec. This is done with a one-line change that simply reduces the number of iterations of several tests, from 256, to 10. Thanks to Ralph Campbell for suggesting changing NTIMES as a way to get the speedup. Link: https://lkml.kernel.org/r/20201003011721.44238-1-jhubbard@nvidia.com Signed-off-by: John Hubbard Suggested-by: Ralph Campbell Cc: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton --- tools/testing/selftests/vm/hmm-tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/testing/selftests/vm/hmm-tests.c~selftests-vm-10x-speedup-for-hmm-tests +++ a/tools/testing/selftests/vm/hmm-tests.c @@ -49,7 +49,7 @@ struct hmm_buffer { #define TWOMEG (1 << 21) #define HMM_BUFFER_SIZE (1024 << 12) #define HMM_PATH_MAX 64 -#define NTIMES 256 +#define NTIMES 10 #define ALIGN(x, a) (((x) + (a - 1)) & (~((a) - 1))) _