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.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 EA4DBC4363D for ; Fri, 2 Oct 2020 08:06:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 91C68206B7 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 91C68206B7 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) Received: by kanga.kvack.org (Postfix, from userid 40) id BFBA06B0068; Fri, 2 Oct 2020 04:06:27 -0400 (EDT) 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-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-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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain 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(-) --=20 2.28.0