From patchwork Tue Jul 19 19:56:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Rasmussen X-Patchwork-Id: 12922972 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 D3B42C433EF for ; Tue, 19 Jul 2022 19:56:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 744A26B0073; Tue, 19 Jul 2022 15:56:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6BD636B0074; Tue, 19 Jul 2022 15:56:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D3E56B0075; Tue, 19 Jul 2022 15:56:36 -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 4F5896B0073 for ; Tue, 19 Jul 2022 15:56:36 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 21B2AC01E4 for ; Tue, 19 Jul 2022 19:56:36 +0000 (UTC) X-FDA: 79704906792.24.DF0AD8E Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) by imf03.hostedemail.com (Postfix) with ESMTP id C071E2005B for ; Tue, 19 Jul 2022 19:56:35 +0000 (UTC) Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-31c936387fbso127381517b3.2 for ; Tue, 19 Jul 2022 12:56:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=2lmji2pJwQUUP3R6t1yXuXRPrPh1yDx0i1mGLg8CxXk=; b=rRPjfzCfRNd5lQiZ67VG1PsIVIYjPwFy08N1NgXwZEdmOj6JA+coqAzVWkDJIlNRY5 YYf3Y/bM+zhmKkRWAsQ2bjiJrwYdl3VnbCcCZGMRHF6ew7w4EywM1I3/QseVs1Mn1HXX tpRbi7PWHIGlDIpJweXOzNMEFyij2g2rnpJrMrBPd0i5ICMUSiInyP+w3GQ4/Jk2pCQB aC/ZpgWXZ+1KmqHJq0wUclsGmDY8ho2QpLzY95UOiGq0A0G8UHc0v+qIJPIQ9/n6efPf iewCSIjs66UnweZpc/EznMh9zB+4mPI7OoyNXC/osApBENIUmF4qtOi2XbW2DpSB5wMJ zUIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=2lmji2pJwQUUP3R6t1yXuXRPrPh1yDx0i1mGLg8CxXk=; b=ZrlFawAvpM3mLCA6X7yqmsHBB9Qlq+qyjwKxIB/0ofW6IH70cRuMrvcWxtNot/+Rrw 3jjnnKGXKGfuvfa+X+ZqUhgyyx9jv9mfHO4oeKNWQWYVLQZiKmSgsUkwl1RymLPrnphx RAGMuJ5ec52ya3v8kZyMSd/DkCdqh1I6heYr1ZB1SO3lXSX8WoDkUTftZs1F3P9UNxnn LuNLR+V/DoRdxy8WhvXRs2KDOZnzcMPvjp7Eqk0c7jswbpIOvGz2Xggf4RzpBcctj6ye iJIKl06nlmO4oZ7tBQ+4GuCzs0OpI0UzpUUoJ+DwNS5RiIvZr5uSBzslxodF8c4fcAGe G81g== X-Gm-Message-State: AJIora9FV6rCKoLChXio7PKu+0D3gcM+eGm/j8Z0kUAWwEyypJU4B48b o3+hZ/wYsIdngTnCLvuQddjt4G/8b4rZMS/qkWhc X-Google-Smtp-Source: AGRyM1uCcb2pDVTpDDsVUiZd0J0+WEjtbbgh4jqcG3bGfivbKRKkUwVy3Wnb/o8tyjKhhIKWZ30sg4m4oT0+s0fm0h3m X-Received: from ajr0.svl.corp.google.com ([2620:15c:2d4:203:a065:9221:e40d:4fbe]) (user=axelrasmussen job=sendgmr) by 2002:a25:7c41:0:b0:670:7de8:1d4b with SMTP id x62-20020a257c41000000b006707de81d4bmr5955132ybc.488.1658260595015; Tue, 19 Jul 2022 12:56:35 -0700 (PDT) Date: Tue, 19 Jul 2022 12:56:24 -0700 In-Reply-To: <20220719195628.3415852-1-axelrasmussen@google.com> Message-Id: <20220719195628.3415852-2-axelrasmussen@google.com> Mime-Version: 1.0 References: <20220719195628.3415852-1-axelrasmussen@google.com> X-Mailer: git-send-email 2.37.0.170.g444d1eabd0-goog Subject: [PATCH v4 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-mm@kvack.org, linux-kselftest@vger.kernel.org, Shuah Khan ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=rRPjfzCf; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf03.hostedemail.com: domain of 3cwzXYg0KCAYg3krxgys0yyktmuumrk.iusrot03-ssq1giq.uxm@flex--axelrasmussen.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=3cwzXYg0KCAYg3krxgys0yyktmuumrk.iusrot03-ssq1giq.uxm@flex--axelrasmussen.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1658260595; a=rsa-sha256; cv=none; b=bsW99kaAiO7UTgDAFRc9MTvTs3KY/rXWK3ls+8uTHMbl0DVslMmeaxlX4uPuvU5O9ijoTv Hhcdxz6Rhkwn/vka/5WpROp16cJUknvZTT3RulmNprddHnAV0E2iG6gXD2VUyZMnA6pODI 0jqUkaFf0oBVXK6tamhLtpXlKinlHYA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1658260595; 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=2lmji2pJwQUUP3R6t1yXuXRPrPh1yDx0i1mGLg8CxXk=; b=zixfZGs/+WTQE0CnqNo1o+NOEDywFC4dtYjR/RM3bgH5/vhNHLRUKSgDVyFLsWseI8k5GI nEMevQHBywXuDyg7Jrh1EjveQNNlSW7EUZ/xSN0b835Jshyh92z1TL87BBriqcFV4WyVRE Za9C7qB/rUlpJsTpfbAzbGvo/let19U= X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: C071E2005B Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=rRPjfzCf; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf03.hostedemail.com: domain of 3cwzXYg0KCAYg3krxgys0yyktmuumrk.iusrot03-ssq1giq.uxm@flex--axelrasmussen.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=3cwzXYg0KCAYg3krxgys0yyktmuumrk.iusrot03-ssq1giq.uxm@flex--axelrasmussen.bounces.google.com X-Stat-Signature: 7qb5izjswigjebigyn5x13apwdgurhjq X-HE-Tag: 1658260595-703631 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 41fce8bea929..e70ae0f3aaf6 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