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=-5.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 0CEDDC4363D for ; Sat, 3 Oct 2020 05:50:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7DBE3206CA for ; Sat, 3 Oct 2020 05:50:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="HgaGZVEP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7DBE3206CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8D4B76B005D; Sat, 3 Oct 2020 01:50:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 885796B0062; Sat, 3 Oct 2020 01:50:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 77479900002; Sat, 3 Oct 2020 01:50:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0051.hostedemail.com [216.40.44.51]) by kanga.kvack.org (Postfix) with ESMTP id 4AEBD6B005D for ; Sat, 3 Oct 2020 01:50:48 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id C91238249980 for ; Sat, 3 Oct 2020 05:50:47 +0000 (UTC) X-FDA: 77329540134.05.net52_50156ee271aa Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id A8B2C18016696 for ; Sat, 3 Oct 2020 05:50:47 +0000 (UTC) X-HE-Tag: net52_50156ee271aa X-Filterd-Recvd-Size: 4150 Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Sat, 3 Oct 2020 05:50:46 +0000 (UTC) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Fri, 02 Oct 2020 22:48:57 -0700 Received: from [10.2.58.214] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sat, 3 Oct 2020 05:50:36 +0000 Subject: Re: [PATCH] selftests/vm: 10x speedup for hmm-tests To: SeongJae Park CC: Andrew Morton , Shuah Khan , LKML , , , Ralph Campbell References: <20201003052309.30013-1-sj38.park@gmail.com> From: John Hubbard Message-ID: Date: Fri, 2 Oct 2020 22:50:36 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20201003052309.30013-1-sj38.park@gmail.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1601704138; bh=SOLzP3xg8YsiH3PxRq3X4CuKhUkGJdTjj6mdMlAmI9U=; h=Subject:To:CC:References:From:Message-ID:Date:User-Agent: MIME-Version:In-Reply-To:Content-Type:Content-Language: Content-Transfer-Encoding:X-Originating-IP:X-ClientProxiedBy; b=HgaGZVEPOK+hHIKL4sU6bUI33DyJEObEq6gCCb4NspdqTuPSnwAJkabez6OtP+5qr t9qAOTwGtrhhm4B6RQ9SerUtuIzc4uCQVpUbVESoASExcZ0n/zK25u9D435UhlW2Il H8kuLwurjhGqOQYwf8L9KAMP7nutwEQ8/C33hkZSh7fYBP/09DvYkQzyO8DmgMsARx CGVDHFSydj0rbhT3T8GOWg0QyClju/mkfSxS5t/Zvxym4+uL6WvaP1jgAzneRogE/P /oqhZtdenvS6kHVLXAxLOvtBLYrQTSpgEkfcB29r4KmGhT75uPcmO42w2QyA3fTy42 YLcDlpv8MwkHg== 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: On 10/2/20 10:23 PM, SeongJae Park wrote: > On Fri, 2 Oct 2020 18:17:21 -0700 John Hubbard wrote: > >> 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. > > Could this result in reduced test capacity? If so, how about making the number > easily tweakable? > The choice of iterations was somewhat arbitrary. Unless and until we have specific bugs that show up at a given number of iterations, we should avoid running large iteration counts that blow the testing time budget. Here, I'm not aware of any bugs that show up between 11 and 256 iterations, which is why I think 10 is an acceptable iteration count. But, you are right: it's a nice thought to make the iteration count adjustable via the command line. That would allow hmm-tests to act as a quick selftest item, and also to provide a little bit more of a stress test, when manually invoked with a higher iteration count. That's a separate patch, though. Because TEST_F() and related unit test macros used in this area, expect to run the same way every time, and they don't really want to be fed iteration arguments. Or maybe they do, and I've missed it on my first quick pass through. And in fact, maybe it's not a good fit, if TEST_F() and kselftest are pushing for more of a CUnit/gtest style of coding. There are some design and policy questions there. It reminds me that some programs here don't use TEST_F() at all, actually. But anyway, I'd definitely like to sidestep all of that for now, and start with just "get the test run time down under 1 second". thanks, -- John Hubbard NVIDIA