From patchwork Mon Aug 8 17:56:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Rasmussen X-Patchwork-Id: 12938953 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21249C3F6B0 for ; Mon, 8 Aug 2022 17:56:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AEEF36B0073; Mon, 8 Aug 2022 13:56:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AC56A8E0002; Mon, 8 Aug 2022 13:56:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 917A58E0001; Mon, 8 Aug 2022 13:56:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 846C66B0073 for ; Mon, 8 Aug 2022 13:56:24 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 6232FA017B for ; Mon, 8 Aug 2022 17:56:24 +0000 (UTC) X-FDA: 79777179888.30.F7B5814 Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) by imf28.hostedemail.com (Postfix) with ESMTP id E47D0C014F for ; Mon, 8 Aug 2022 17:56:23 +0000 (UTC) Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-3225b644be1so83180707b3.1 for ; Mon, 08 Aug 2022 10:56:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc; bh=Jwq0jXWhpPKY4rjZycF0kBtXykpSsmq4jMCb4fxEPCM=; b=Yyk9ueBMp+D30ALuCCr4oQg4v0Phj71m9ZUNFotBmxh5WUoEer1fIKUM0YNI8t36m/ LAKC/p9D6Ibbok4i3QPJuOcLeLuIZtfZz5hWpJ2SamU/0IqIgKUcq5tdx+B0lyBwjzWU 6rlAg4BqXREsBkDISimbX7tf6KbTpVyl8Sp7EURabchFN3gbwsiNGVRrvf2Dz2vV+YiO 3CyjWXzxMSiuTFLOXfXCyEX3jlVt/8lgkhEOc6o2d2ADrfwgq5hAGBW01/v+pi4V5E9Q Y0xIlwhyNQFlXTgiXIJE1rXkVz/ykc6WHPLIvdfzBC4Sd+2KaItcnCFA+eFXdTaHMTth ajfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc; bh=Jwq0jXWhpPKY4rjZycF0kBtXykpSsmq4jMCb4fxEPCM=; b=ghmGM39celPYSRrECltBxG+4RszIHCwjZFTJGGqAd1xFpWx9fLKOqBi8tk5w4U0OQe cH9Bu4PLJvGxw1WIF5+74rqIGpaiqNjj9pBVXaCJ5nkY3hXnlUnMp+imYvHh9ckE5dfh 3aoqn9S9hRj3On7hQ/CWegc0lOdMbksQT43v6cPiBGtTfZorI/Ear+1zNRqoyrf6urZk IHPSzCuys2tLKCbe5l/5tLQ0R9Q+fUicF6WlMtKatNBT3t9qpAVBSlMhSnrUQFesi8bM CF8n0bdbwi8rIjkXlelcsKxaqgz21sPEO+n+DXfp4qS+pFWFyABj7avcmnJ6o+2RuBmY RuPQ== X-Gm-Message-State: ACgBeo0ufse3SyBxmD25Ea3bDs8VGoIRVYKSVHP9RKXq6/dRmLb26k5Q ioheUpSau638SQzcrewVP10IGdU8DEdaWLuafCRG X-Google-Smtp-Source: AA6agR43R4xY0r1/MvCjyc43MmcPqeFzuRXsCNk0/nJZn8G74hDr1u1wkNE8kXISlycKU+NX0kObB9Nbsmb3XfCgX24r X-Received: from ajr0.svl.corp.google.com ([2620:15c:2d4:203:7a2a:3bb5:f3a0:3bbc]) (user=axelrasmussen job=sendgmr) by 2002:a25:41cb:0:b0:671:80ac:bb4c with SMTP id o194-20020a2541cb000000b0067180acbb4cmr16114083yba.24.1659981383209; Mon, 08 Aug 2022 10:56:23 -0700 (PDT) Date: Mon, 8 Aug 2022 10:56:10 -0700 In-Reply-To: <20220808175614.3885028-1-axelrasmussen@google.com> Message-Id: <20220808175614.3885028-2-axelrasmussen@google.com> Mime-Version: 1.0 References: <20220808175614.3885028-1-axelrasmussen@google.com> X-Mailer: git-send-email 2.37.1.559.g78731f0fdb-goog Subject: [PATCH v5 1/5] selftests: vm: add hugetlb_shared userfaultfd test to run_vmtests.sh From: Axel Rasmussen To: Alexander Viro , Andrew Morton , Dave Hansen , "Dmitry V . Levin" , Gleb Fotengauer-Malinovskiy , Hugh Dickins , Jan Kara , Jonathan Corbet , Mel Gorman , Mike Kravetz , Mike Rapoport , Nadav Amit , Peter Xu , Shuah Khan , Suren Baghdasaryan , Vlastimil Babka , zhangyi Cc: Axel Rasmussen , linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, linux-security-module@vger.kernel.org, Shuah Khan ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1659981384; a=rsa-sha256; cv=none; b=mNl9tIDjM8cYY4dagP/PdofRrfZT23bUUMkhXhCQf3E/J2OIgjeoa3rvb42BAK1KXXehAE cg+zV9qkajQtkZzmT8sC6JLNJwVTFjGVE95yr6mX4ndgODwj6fNc+y5wzGr7i0OVEuYaCp LIB7433dq9KBJLBcITz6Wumy1SLWiYs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1659981384; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Jwq0jXWhpPKY4rjZycF0kBtXykpSsmq4jMCb4fxEPCM=; b=JsLNm7YLf0/UkByCOdX8Ecs/UQk4w0qpmd265OMV3U8j2Lrv7gf1h13+s3JTpT/LeC7Q+7 aazhOdzKPgbX8BMb8iaeSra5jTr2W4DgJUSGNRSKpGNDIEcVOo6PiKH4ZpeeLTBv+oLc0n r9TgVhRXHSqdAo9iVVGolg4iJH76dTY= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=Yyk9ueBM; spf=pass (imf28.hostedemail.com: domain of 3R07xYg0KCMYm9qx3m4y644qzs00sxq.o0yxuz69-yyw7mow.03s@flex--axelrasmussen.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=3R07xYg0KCMYm9qx3m4y644qzs00sxq.o0yxuz69-yyw7mow.03s@flex--axelrasmussen.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com X-Stat-Signature: w1y3ag531mokezpgekibjizn4q6ociz9 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: E47D0C014F Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=Yyk9ueBM; spf=pass (imf28.hostedemail.com: domain of 3R07xYg0KCMYm9qx3m4y644qzs00sxq.o0yxuz69-yyw7mow.03s@flex--axelrasmussen.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=3R07xYg0KCMYm9qx3m4y644qzs00sxq.o0yxuz69-yyw7mow.03s@flex--axelrasmussen.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com X-HE-Tag: 1659981383-262770 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This not being included was just a simple oversight. There are certain features (like minor fault support) which are only enabled on shared mappings, so without including hugetlb_shared we actually lose a significant amount of test coverage. Reviewed-by: Shuah Khan Reviewed-by: Peter Xu Signed-off-by: Axel Rasmussen --- tools/testing/selftests/vm/run_vmtests.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/vm/run_vmtests.sh b/tools/testing/selftests/vm/run_vmtests.sh index de86983b8a0f..b8e7f6f38d64 100755 --- a/tools/testing/selftests/vm/run_vmtests.sh +++ b/tools/testing/selftests/vm/run_vmtests.sh @@ -121,9 +121,11 @@ run_test ./gup_test -a run_test ./gup_test -ct -F 0x1 0 19 0x1000 run_test ./userfaultfd anon 20 16 -# Test requires source and destination huge pages. Size of source -# (half_ufd_size_MB) is passed as argument to test. +# Hugetlb tests require source and destination huge pages. Pass in half the +# size ($half_ufd_size_MB), which is used for *each*. run_test ./userfaultfd hugetlb "$half_ufd_size_MB" 32 +run_test ./userfaultfd hugetlb_shared "$half_ufd_size_MB" 32 "$mnt"/uffd-test +rm -f "$mnt"/uffd-test run_test ./userfaultfd shmem 20 16 #cleanup