Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1833415pxk; Fri, 2 Oct 2020 22:52:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSZLmXTp0f1s2DU253MhAMaM6spnsymZ2f8PNbCMjnEJ1g3PLMorf83e+dIzpGl7qrlVXg X-Received: by 2002:a17:906:c55:: with SMTP id t21mr5526411ejf.276.1601704320395; Fri, 02 Oct 2020 22:52:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601704320; cv=none; d=google.com; s=arc-20160816; b=YZFX+vShReprVIMXFcjtP+l3fYZoiinanRlW8YZnGY/IyqgjdJPwMB4INb9xKBOF8F b8Ne/OZqnoyRhlfO0W5k+ztqt9KQRNe8IQw2MduxsQjI7kMknaRXH09Kj9OnovWNUOSU 9w+jtb3oPYLtzcRa/IFJUNoO3VAX4LZRF4smIP1wCzDZV4MW6Rgs2O5iZRw8ZFXvHAAs eR5msLTo7jbebb68y74MgFNi10IEF02IdMWBw/emdNBv/kg4B/X3graZ0zyAUsGkc6+i XyCgnlaM0zvA82bVmNL/5cBhLTARi8CECgUA1kEXZcyrc7Vwu4sdwTn7wxQolsLXLQII AX1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=SOLzP3xg8YsiH3PxRq3X4CuKhUkGJdTjj6mdMlAmI9U=; b=LRmOV600z1D/RVJ2HIrEDNM1hSiepXw74n9m++iFnHbkw1AfXqAiuAyr1QkitQThEt 5f8X3lSwNspbZLhnl8k4GATdwz7RGfAmcSF4VhU5pM46oes9oZHKmcSf0KqjSXiVYJak XX9ZDbmTWEdCqqVZrEBkCACySxxU/WtPKSCpCq1HJQT+fb0dUcXim7YMrTgpe3e3T7kx LQW4QPdP3SKiPfHLcbMuyo6beEbEXaKxHtz26BCpV4Fwc79meZTe32gsQBTsctmazCih wYPiHlNjxnlLqrNiSv/WId0qCQLq4s5d1O8yCWqO5w0hnh7FaYc5TK9CqfuOC7jyZ1X8 rgTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=HgaGZVEP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q12si676857edr.141.2020.10.02.22.51.37; Fri, 02 Oct 2020 22:52:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=HgaGZVEP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725747AbgJCFum (ORCPT + 99 others); Sat, 3 Oct 2020 01:50:42 -0400 Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:15671 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbgJCFum (ORCPT ); Sat, 3 Oct 2020 01:50:42 -0400 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== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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