Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1116127pxk; Fri, 2 Oct 2020 01:07:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymsnfhzpRjc5ElCW7klXiUwj5ItwWtjXdu2X1BpMuYVlURh0NzInAMvkR+hFY61YXtBR9K X-Received: by 2002:a17:906:b01a:: with SMTP id v26mr1124605ejy.166.1601626068503; Fri, 02 Oct 2020 01:07:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601626068; cv=none; d=google.com; s=arc-20160816; b=iGuCOG8H56S9hMIBmW7gXxDLR92EzgSTqw04dpSsz4sTyNBgUFfie9SoTABDoxKS6X byZvch6cXJjYZTI0zH4x5/s7tQJPBClGMzVgMsDid4fFfdPpujl1qijHfUyuTLSZOdsc K2FoHHTkjoHTbnKU5CrNrdUqaoAX/Y9+C2FbgXSphy/nsIkpTwhP/SlzeJu/d1k7gsfT 9nDYaGGWMgPCfLehcjw9kbCdVA/MZ1agSEs0ZvLLCUBEmleDucCpvQRMig3l38xI+vUE B/K6g5F+59/uYFExV5BvLD2gJr6vDt42cCZ22RJjYrCSefB4FKn0K8ZUYLUxQ7W/uAbn SS1Q== 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 :mime-version:message-id:date:subject:cc:to:from; bh=vUXAAb8HavehIjFccK2mjuy0/N7DBaFYiPYNqXuk2Ec=; b=SsJh3CHdjjDPLTtFcKv3E9WzA8rgyRUEsvyUXVYyt2ZykxdG7INLJnZiJNCvTu3owY Ba6e/dDp5qI58ECC470bZFwzlVPINAioH2NJoXEahxVwORETbkTHCb5A3e1VRJxouk/Y deulfh7e5tZYloCXyzw0cFqbf9t6Dyu3Eo9AgLnHT+Iwr3RI0ieFwhlnVBYVsOxrx0hY S49FJHd5m2NWdC50ObV1sd8yHZWQ7dIXHRZ4a4+SNpmWkCg03GW4c3P7ds+XhyPO9n0y g2Ey0zUA5PgrEcyiPAEbK9tmKFWkF8/K7MQrv080gLeiYdoP9E79Z7jBvVsyXGaMF5iz cOtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=eaAJEDYH; 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 d9si481157edz.97.2020.10.02.01.07.25; Fri, 02 Oct 2020 01:07:48 -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=eaAJEDYH; 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 S1726090AbgJBIGZ (ORCPT + 99 others); Fri, 2 Oct 2020 04:06:25 -0400 Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:5864 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725961AbgJBIGY (ORCPT ); Fri, 2 Oct 2020 04:06:24 -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 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== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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