From patchwork Fri Oct 2 08:06:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 11812957 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 003FF6CB for ; Fri, 2 Oct 2020 08:06:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9F65A2072E for ; Fri, 2 Oct 2020 08:06:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="eaAJEDYH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9F65A2072E 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 C4A7A6B0062; Fri, 2 Oct 2020 04:06:27 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id BFBA06B0068; Fri, 2 Oct 2020 04:06:27 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AC25C6B006C; Fri, 2 Oct 2020 04:06:27 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0184.hostedemail.com [216.40.44.184]) by kanga.kvack.org (Postfix) with ESMTP id 7F2D06B0062 for ; Fri, 2 Oct 2020 04:06:27 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id EB0AF3631 for ; Fri, 2 Oct 2020 08:06:26 +0000 (UTC) X-FDA: 77326253172.13.base70_25079c7271a2 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id AFFEC18140B72 for ; Fri, 2 Oct 2020 08:06:26 +0000 (UTC) X-Spam-Summary: 1,0,0,6734ae8921f31467,d41d8cd98f00b204,jhubbard@nvidia.com,,RULES_HIT:41:355:379:421:541:973:988:989:1260:1261:1277:1311:1313:1314:1345:1437:1513:1515:1516:1518:1521:1534:1540:1711:1730:1747:1777:1792:2393:2559:2562:2692:3138:3139:3140:3141:3142:3352:3743:3865:3866:3867:3868:3870:3871:3872:3874:4184:4362:4560:5007:6119:6261:6653:8531:8784:9040:10004:10400:11658:11914:12043:12296:12297:12521:12679:12895:13069:13071:13311:13357:14096:14097:14180:14394:14721:21060:21080:21324:21451:21627:21939,0,RBL:216.228.121.143:@nvidia.com:.lbl8.mailshell.net-64.201.201.201 62.22.0.100;04y8xw9dqwokjpcpkocf395d3um6focsqekqhy1wbkoukeckj79kas9c89z4ah7.5nangwh1n4woc5x8twu39q5uri764hhr5usd61qq1b6sx71kzxu6onpcpp9oakq.w-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:21,LUA_SUMMARY:none X-HE-Tag: base70_25079c7271a2 X-Filterd-Recvd-Size: 2925 Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Fri, 2 Oct 2020 08:06:25 +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 01:04:40 -0700 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 2 Oct 2020 08:06:24 +0000 Received: from sandstorm.nvidia.com (10.124.1.5) by mail.nvidia.com (172.20.187.18) with Microsoft SMTP Server id 15.0.1473.3 via Frontend Transport; Fri, 2 Oct 2020 08:06:24 +0000 From: John Hubbard To: Andrew Morton CC: Shuah Khan , LKML , , , John Hubbard Subject: [PATCH 0/1] selftests/vm: 8x compaction_test speedup Date: Fri, 2 Oct 2020 01:06:20 -0700 Message-ID: <20201002080621.551044-1-jhubbard@nvidia.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-NVConfidentiality: public DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1601625881; bh=vUXAAb8HavehIjFccK2mjuy0/N7DBaFYiPYNqXuk2Ec=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:MIME-Version: X-NVConfidentiality:Content-Transfer-Encoding:Content-Type; b=eaAJEDYHeLpHg+VyuGqjO1gSSpyXTgzp2JSOjhnlE0EuB1CI0hs++kjw3CMK8TkFO cnq3xu7e3lo+aFJknfyL4vkpSmfbQ/NsaewiQesdiYBXfY2Uq6d1Vs5VlKWtlCfBSx 3DNRFXXI4TrI5mwB6HdWVnc7nIC8vTT71eIrdefBiX3bbxy/Oovxybbj0dWtOCA9vA GNyvIeOJ7wuRtpAj1N9G1GalpY+Ifgm4Wzg3X4soZbS2Lxfm69tV7f15N4hxQsyFpt eLiXWYxyeSW51qh+89BorlD82dI/Mssm/ICgMHSMDYYtOAwZ+icj3ciyFU2olSr2jY zdyCmyF1j+Y9Q== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000396, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi, Maybe this should really be an RFC, given that I don't fully understand why the compaction_test.c program was mmap'ing 1 MB at a time. So apologies in advance if I've mucked up something important, but if so, maybe we can still find a way to get this fixed up to something better. Anyway: there are 20+ tests in tools/testing/selftests/vm/. The entire running time for these (via run_vmtest.sh) is about 56 seconds, of which over half is due to just one test: compaction_test, which takes 27 sec! (A runner-up is HMM, at 11 sec, so it's up for a look next.) The other tests mostly take a few ms, and a few take 1.0 sec. This drops the compaction_test run time from 27, to 3.3 sec. Enjoy. :) thanks, John Hubbard NVIDIA John Hubbard (1): selftests/vm: 8x compaction_test speedup tools/testing/selftests/vm/compaction_test.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)