Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2798729pxk; Sun, 27 Sep 2020 23:23:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwP2SA+uXsQ+bJDbcWypVex6cemDjzUcTg+t560JNfukLwOzHryg5chClaUEQB0AAxwZ7fi X-Received: by 2002:a17:906:4819:: with SMTP id w25mr196689ejq.300.1601274217779; Sun, 27 Sep 2020 23:23:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601274217; cv=none; d=google.com; s=arc-20160816; b=gHSAbH/TCDuGkny9jVcVg/xMzqr1Rc9hG2bhtV2l50gImjvfwJlCTzaljXbeXFgxVv 6K2Q4U7JJjzzAHuA7U4gd28U/RBQIygYgg/+7o/5oBk5we1f5Y0J59U0rn7owGfxKuMa nTcA6oFoTRR5Pi0YLK7x6EPJqP03jdh9chIOqJ4rA9piiALwn2avWjrbVbd0c+/mcdHP c2Lzmq5hk78sPadmE1jN7dERFQU89CQuCt1t2B/KOfsliiYO9w70D4r4l9BdIvbcDAMs JUlLQes/fJkiVm5GtKxIeICzrjITV+MxanABNXSr/GZNhJedgCuG3UdKLoNbp/XmGu6w 18WQ== 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=aje0xlQbgGTe8PDh3PLtbmYUZlvyK6r4rrB1MLJQctg=; b=b/aONosFxrDGJPHwmSLTynsoTdwSj64KoiL4IdxvlVXZpjMcpci8sgXbUxplS2nn0L FWRDl9dIn+xEOGpgnL8Vcc0TXUEKDlkSvvDF8DHCZmszBoZGDcBXKoSo7YT9LoIIxiGk bVSIHGtah9g+2IQZf9LFpc3wmhCY+TmGuzciePoo1/nj4J3vK6Ta4l84KPVLjVP+rMhw Q3RlF6NsFAWV4pZhnW8goyjaw9fVywqwx6QQxipF9ihXyI32lyWjyr1aizbfDJk/wAGA sQKo7rmkGsDS6WjN43LfMUllcbo2Yo9eP5JpfVvJBIkirSkW+Bp9oLCIDG3+D5Ukjdjh X8iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b="IU1bhmM/"; 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 n15si8158316edy.300.2020.09.27.23.23.15; Sun, 27 Sep 2020 23:23:37 -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="IU1bhmM/"; 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 S1726608AbgI1GWB (ORCPT + 99 others); Mon, 28 Sep 2020 02:22:01 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:2535 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726516AbgI1GWB (ORCPT ); Mon, 28 Sep 2020 02:22:01 -0400 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sun, 27 Sep 2020 23:21:11 -0700 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 28 Sep 2020 06:22:00 +0000 Received: from sandstorm.nvidia.com (10.124.1.5) by mail.nvidia.com (172.20.187.12) with Microsoft SMTP Server id 15.0.1473.3 via Frontend Transport; Mon, 28 Sep 2020 06:22:00 +0000 From: John Hubbard To: Andrew Morton CC: Jonathan Corbet , =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , Ralph Campbell , Shuah Khan , LKML , , , , , John Hubbard Subject: [PATCH 0/8] selftests/vm: gup_test, hmm-tests, assorted improvements Date: Sun, 27 Sep 2020 23:21:51 -0700 Message-ID: <20200928062159.923212-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=1601274071; bh=aje0xlQbgGTe8PDh3PLtbmYUZlvyK6r4rrB1MLJQctg=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:MIME-Version: X-NVConfidentiality:Content-Transfer-Encoding:Content-Type; b=IU1bhmM/2JHR6pBNGilbB3FShB1LLkAywl19QB5Dq9eoSE/k7+ELxevvqYtXqAq8W lpwYUDgpCvEYd5KvlYtILKhCPIFgwVjy8alY2Ae/TziZ/b01cpdjtTA1kTbaDkSUSg P0uftuJ3Rvi2tvE3gxeI+W/9o2/NLo03F5o7nNcecoVHGpWQGrpWJTVLrGk2a5kVpY i7lJun/WUkKTaqQcN8XpIdXlqbkKDdfuXWppC9oPH0nlRncS8C9Qo24u1u0xyYQ2Su i4+wGtF0hsKTLsuwwYbklNgRZsq8LugtCEDfcjWbBN0EMBc66t2fhCcRnfuu8hlnTM L3QbLSspGyNig== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is based on the latest mmotm. Summary: This series provides two main things, and a number of smaller supporting goodies. The two main points are: 1) Add a new sub-test to gup_test, which in turn is a renamed version of gup_benchmark. This sub-test allows nicer testing of dump_pages(), at least on user-space pages. For quite a while, I was doing a quick hack to gup_test.c whenever I wanted to try out changes to dump_page(). Then Matthew Wilcox asked me what I meant when I said "I used my dump_page() unit test", and I realized that it might be nice to check in a polished up version of that. Details about how it works and how to use it are in the commit description for patch #6. 2) Fixes a limitation of hmm-tests: these tests are incredibly useful, but only if people actually build and run them. And it turns out that libhugetlbfs is a little too effective at throwing a wrench in the works, there. So I've added a little configuration check that removes just two of the 21 hmm-tests, if libhugetlbfs is not available. Further details in the commit description of patch #8. Other smaller things that this series does: a) Remove code duplication by creating gup_test.h. b) Clear up the sub-test organization, and their invocation within run_vmtests.sh. c) Other minor assorted improvements. John Hubbard (8): mm/gup_benchmark: rename to mm/gup_test selftests/vm: use a common gup_test.h selftests/vm: rename run_vmtests --> run_vmtests.sh selftests/vm: minor cleanup: Makefile and gup_test.c selftests/vm: only some gup_test items are really benchmarks selftests/vm: gup_test: introduce the dump_pages() sub-test selftests/vm: run_vmtest.sh: update and clean up gup_test invocation selftests/vm: hmm-tests: remove the libhugetlbfs dependency Documentation/core-api/pin_user_pages.rst | 6 +- arch/s390/configs/debug_defconfig | 2 +- arch/s390/configs/defconfig | 2 +- mm/Kconfig | 21 +- mm/Makefile | 2 +- mm/{gup_benchmark.c =3D> gup_test.c} | 109 ++++++---- mm/gup_test.h | 32 +++ tools/testing/selftests/vm/.gitignore | 3 +- tools/testing/selftests/vm/Makefile | 38 +++- tools/testing/selftests/vm/check_config.sh | 30 +++ tools/testing/selftests/vm/config | 2 +- tools/testing/selftests/vm/gup_benchmark.c | 137 ------------- tools/testing/selftests/vm/gup_test.c | 188 ++++++++++++++++++ tools/testing/selftests/vm/hmm-tests.c | 10 +- .../vm/{run_vmtests =3D> run_vmtest.sh} | 24 ++- 15 files changed, 403 insertions(+), 203 deletions(-) rename mm/{gup_benchmark.c =3D> gup_test.c} (59%) create mode 100644 mm/gup_test.h create mode 100755 tools/testing/selftests/vm/check_config.sh delete mode 100644 tools/testing/selftests/vm/gup_benchmark.c create mode 100644 tools/testing/selftests/vm/gup_test.c rename tools/testing/selftests/vm/{run_vmtests =3D> run_vmtest.sh} (91%) --=20 2.28.0