From patchwork Fri Aug 19 20:51:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Rasmussen X-Patchwork-Id: 12949220 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 A101EC32772 for ; Fri, 19 Aug 2022 20:52:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 16E756B0073; Fri, 19 Aug 2022 16:52:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0D0738D0003; Fri, 19 Aug 2022 16:52:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E8BFA6B0075; Fri, 19 Aug 2022 16:52:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id D28FA6B0073 for ; Fri, 19 Aug 2022 16:52:13 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id AF56840425 for ; Fri, 19 Aug 2022 20:52:13 +0000 (UTC) X-FDA: 79817539746.20.3EFAC27 Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) by imf02.hostedemail.com (Postfix) with ESMTP id 65D0B80006 for ; Fri, 19 Aug 2022 20:52:13 +0000 (UTC) Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-31f5960500bso94208127b3.14 for ; Fri, 19 Aug 2022 13:52:13 -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=cU7/6qINBgFAfTXfLa178LOY1yjmrSCVESmZNe7FU4M=; b=bC4lMI8huw1uRRzwGbHtFYE2tB88na003CekKY0ACebDw98OX4FLPryvf3oIjLvbpT 2Z94mnqJPrWYcjP3lmF0GohedIfZnStwZI38zjxUUxQx48j9wG65sUDiEbDITVLYRKcL mVtlRswKM70g0APD+T61jU6cKtU63dY0BC21ebFhGj0hneMmEysLC4lYHb5oDAVNIzpp mb1WTwMI3YxYE/fxX+RjWDwy8EJG82QrF3wHtWjI0Yh4kNcN3PEFdFExtn3hpGXpQYOj rmZcPvO+scdHRyaPD9DDquqWTzT/hefOPdLuGFDA0SzUJxmBxqB86WHfSQvwRiAOGOM6 arxg== 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=cU7/6qINBgFAfTXfLa178LOY1yjmrSCVESmZNe7FU4M=; b=6fyYIzgW6IYsgh/lagqGDQ20F6m6HIV5q9s3+UUa3sxxmmWH62behp3r0QlJgjNc0y RXVUU/ysNeRGaEwegxRl33iC9ve44pCJmhTcUwfQ9GJxx0ZfcCwWtyryR9qaOE+mviQu /YG2evwWFe1jACGwh+P6Nq7fHD0RNroFOntTUF9OMk+quVbZQhJmosOaUrdzoxxr2DLn hvuXeTGzoPhqGyV54kZV5iAL374N/iuqrdGpohwzmM2JX9LZokJb9LJa888pJw8dIHFn jqOeuAAC+TE0eSMrUjxrXbbxbWqIW3BBNWH+afZaB1aB/LrVBcQFZKaERe0W0XElXgk5 zo2Q== X-Gm-Message-State: ACgBeo1KzV/cIepKWTO5ZSOX57mmn/tNKAYM/IGg/l3dLwziAOJhgOS6 5qcxHAHomU7+c749msKBMt046GOBsxnm3GuDXaoc X-Google-Smtp-Source: AA6agR597bmial/03bil7OFmDdc43FwP1zL4eJRRyQeIFMDrkuV6ElwIhtWPrgaR/KqOaLYWWlpmihWtAUKx254JQc// X-Received: from ajr0.svl.corp.google.com ([2620:15c:2d4:203:baf:4c5:18b:2c4b]) (user=axelrasmussen job=sendgmr) by 2002:a25:dcd4:0:b0:690:6ce9:7bb5 with SMTP id y203-20020a25dcd4000000b006906ce97bb5mr9476909ybe.516.1660942332708; Fri, 19 Aug 2022 13:52:12 -0700 (PDT) Date: Fri, 19 Aug 2022 13:51:57 -0700 In-Reply-To: <20220819205201.658693-1-axelrasmussen@google.com> Message-Id: <20220819205201.658693-2-axelrasmussen@google.com> Mime-Version: 1.0 References: <20220819205201.658693-1-axelrasmussen@google.com> X-Mailer: git-send-email 2.37.1.595.g718a3a8f04-goog Subject: [PATCH v7 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660942333; 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=cU7/6qINBgFAfTXfLa178LOY1yjmrSCVESmZNe7FU4M=; b=IYFktYhZK/WWoJHIEpbvJ+88BblNBheFt3DPlCO8QGgeg0nBhdt11XG1tgOk+TG1aq2euQ prZUZHW8UmSfKUQI7pGN/eawQUdWIU/ZTkNKdbPmIt4cuLPuB6JidmHv688tIxIGqdeU40 krAa6uiLXqJ/w3+ZUhj9fCcm1s7hETs= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=bC4lMI8h; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf02.hostedemail.com: domain of 3_Pf_Yg0KCAsl8pw2l3x533pyrzzrwp.nzxwty58-xxv6lnv.z2r@flex--axelrasmussen.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=3_Pf_Yg0KCAsl8pw2l3x533pyrzzrwp.nzxwty58-xxv6lnv.z2r@flex--axelrasmussen.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660942333; a=rsa-sha256; cv=none; b=bjKJ/IA0NFmpATKR/bbDljUhDPMaxj6LS6Z5emHK+WHVryL3qQ0v/8ke/0VC3Kf+n3hAn5 7xZ6ROra513jlzvDd72K8SdruG/uLct0Kk6doQ/aVWGNKRF9fdSOzgBGiU3E+EbtbtaSOg x1tGWc52Tb0JB4sqZXUH6aY+VBuocAM= X-Stat-Signature: ntr8d6kn1c7acbxx5xrj3kq5jjh1tw8b X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 65D0B80006 Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=bC4lMI8h; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf02.hostedemail.com: domain of 3_Pf_Yg0KCAsl8pw2l3x533pyrzzrwp.nzxwty58-xxv6lnv.z2r@flex--axelrasmussen.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=3_Pf_Yg0KCAsl8pw2l3x533pyrzzrwp.nzxwty58-xxv6lnv.z2r@flex--axelrasmussen.bounces.google.com X-Rspam-User: X-HE-Tag: 1660942333-863144 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