Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp448935pxb; Wed, 25 Aug 2021 07:04:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYr/2ftSvi2Kat9ZlWPM/KNt81wQfEh8IN9eTDKIYgLjPvLGSXihFlV1lzl4gWO56HxHd/ X-Received: by 2002:a5d:8a0e:: with SMTP id w14mr22578018iod.94.1629900284563; Wed, 25 Aug 2021 07:04:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629900284; cv=none; d=google.com; s=arc-20160816; b=vvni/PFnoQVAPt6FbB38h3D62caML+NdLBmLbX5NidV4S1IJBUTL9tU6nYqPlLEDNM DSs3hTz0Ok7U4vyjKl7iL54T4gkOhNBl/9EBbQqS7AykaqJYN7rSdtwb2A6x3HI6gbqA FMUHkOL5hclFVAVzNU1JVWSSihE/tGYzum3Fuf/Q42s5i3GioalFMkAb95aOfioALaDs hshNp0HxOZMfZq56az0dcAJUbDBUCHFj8Dr91btDXfwQvK3Jn7ZzBvoKePUAnLE0lmKQ ZFjOYQt1R5Wuz2izmOdIQZC++wQwPC9xhZDfTgDzmv3dN5euBzbYZMHnt3JrGbOgdI5N AYCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=N/9i9nEMNVE9eooqHddAJz3HsTlXWro9ASwXelrHFBU=; b=x/3ySRyD8OLr+hqA/aTfQq+BafisW2QHoWE9Yxlx8nqdhn4HBZX0QUtagH5JEgsomW sKJK5PzIPTIJ7JPqA/Nd4g7gGuq0A93hKeOTr2aeuwjFk1Y2yXLg2xuAH4UsT625VKpH K9ZuVxI9atnlkkpQ9C5k3WNMPlmDbRB/dt89ebysjsspvWY5adMs2u47CFrgVd4CBRAO jaPP4YwXKggAPg5mDV3zgVcLrExHGnn3pmpg6qmBi3PZLBH7SVcQstaKWr6IyHRccExu OC8Ww6e56X60OY1xXfVuAALLCLwa9QgX4o35okQDzQMUgSi2ufQXKM3XTshX9Gf3lCkx ZudQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o20si2558732iov.71.2021.08.25.07.04.31; Wed, 25 Aug 2021 07:04:44 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240524AbhHYN7r (ORCPT + 99 others); Wed, 25 Aug 2021 09:59:47 -0400 Received: from esa3.mentor.iphmx.com ([68.232.137.180]:53856 "EHLO esa3.mentor.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232058AbhHYN7q (ORCPT ); Wed, 25 Aug 2021 09:59:46 -0400 IronPort-SDR: 5c3Zyep2JLRD8+wLRpZVe3AoaXiLoTYnLk1kGRSOHiomBfUl3qMxGc/6Q9AjDUO0GcE0Yhj5xQ V58EHPUh3hx17ryLq966sNgnuZSrZeva57bz7xuwfmCGJ8AiwE1EABDBe+cXHOJyVpzOlWBW9h Vo2naqeJyQjuVTq8AHWs5FRbQ626HGEvpEl3kBFcr99rF3IB2UDbYZSc70GirR5idh32bgsxtM WfI0BxQHGZ0KZ28N8mxYbvtgOuthaTVz1JtGIuNGgRieJ3wCi9KB26ANsBNPjx86oF3POYJI77 tcOubP/b0M8X4JgHdSpsRAV3 X-IronPort-AV: E=Sophos;i="5.84,350,1620720000"; d="scan'208";a="65095157" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 25 Aug 2021 05:59:01 -0800 IronPort-SDR: DA+BhndMeNe0SoZixKpNKA6Ap9wxyrw+2VEhDQpoiTYNDaOj6zyP8bSOGZSDPnP/Ip4ygW5ElQ kQ7jR94Yo1NrSqZx/SqCPjhpLbd1XNgjy6Lt6ijBw7F+r0n+cIPWnCCmxC9UKJN2yDlPBV8hQn 9o48U8Za8hSxV7CBLmvWCV09rwMNwPe+I1v8A62P9GEAsDR1qKkVCg1Sy7OMLtQZI48q/vfz3o oqn0UmOUAtY1/M+6clbmuhbDIJKuJhbKo1vTtptDHPmUzYl3fM1esqmgNrt2eAjzPJSppqgzrN kA8= From: "George G. Davis" To: Shuah Khan , "open list:KERNEL SELFTEST FRAMEWORK" , open list CC: , Eugeniu Rosca , "George G. Davis" Subject: [RFC][PATCH] selftests/vm/transhuge-stress: fix ram size thinko Date: Wed, 25 Aug 2021 09:58:43 -0400 Message-ID: <20210825135843.29052-1-george_davis@mentor.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "George G. Davis" When executing transhuge-stress with an argument to specify the virtual memory size for testing, the ram size is reported as 0, e.g. transhuge-stress 384 thp-mmap: allocate 192 transhuge pages, using 384 MiB virtual memory and 0 MiB of ram thp-mmap: 0.184 s/loop, 0.957 ms/page, 2090.265 MiB/s 192 succeed, 0 failed This appears to be due to a thinko in commit 0085d61fe05e ("selftests/vm/transhuge-stress: stress test for memory compaction"), where, at a guess, the intent was to base "xyz MiB of ram" on `ram` size. Here are results after using `ram` size: thp-mmap: allocate 192 transhuge pages, using 384 MiB virtual memory and 14 MiB of ram Fixes: 0085d61fe05e ("selftests/vm/transhuge-stress: stress test for memory compaction") Signed-off-by: George G. Davis --- tools/testing/selftests/vm/transhuge-stress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/vm/transhuge-stress.c b/tools/testing/selftests/vm/transhuge-stress.c index fd7f1b4a96f9..5e4c036f6ad3 100644 --- a/tools/testing/selftests/vm/transhuge-stress.c +++ b/tools/testing/selftests/vm/transhuge-stress.c @@ -79,7 +79,7 @@ int main(int argc, char **argv) warnx("allocate %zd transhuge pages, using %zd MiB virtual memory" " and %zd MiB of ram", len >> HPAGE_SHIFT, len >> 20, - len >> (20 + HPAGE_SHIFT - PAGE_SHIFT - 1)); + ram >> (20 + HPAGE_SHIFT - PAGE_SHIFT - 1)); pagemap_fd = open("/proc/self/pagemap", O_RDONLY); if (pagemap_fd < 0) -- 2.17.1