From patchwork Sat Mar 21 00:31:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralph Campbell X-Patchwork-Id: 11450599 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8EF5714B4 for ; Sat, 21 Mar 2020 00:31:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 37BA820757 for ; Sat, 21 Mar 2020 00:31:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="ErrK7/Oy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37BA820757 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id ACD836B0003; Fri, 20 Mar 2020 20:31:16 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A7D026B0005; Fri, 20 Mar 2020 20:31:16 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 993B56B0007; Fri, 20 Mar 2020 20:31:16 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0099.hostedemail.com [216.40.44.99]) by kanga.kvack.org (Postfix) with ESMTP id 815736B0003 for ; Fri, 20 Mar 2020 20:31:16 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 3BBF552D1 for ; Sat, 21 Mar 2020 00:31:16 +0000 (UTC) X-FDA: 76617490152.26.lamp03_6255ac226751e X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,rcampbell@nvidia.com,,RULES_HIT:30034:30054:30056:30064:30070,0,RBL:216.228.121.65:@nvidia.com:.lbl8.mailshell.net-64.10.201.10 62.18.0.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:28,LUA_SUMMARY:none X-HE-Tag: lamp03_6255ac226751e X-Filterd-Recvd-Size: 4538 Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Sat, 21 Mar 2020 00:31:15 +0000 (UTC) Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 20 Mar 2020 17:31:01 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Fri, 20 Mar 2020 17:31:14 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Fri, 20 Mar 2020 17:31:14 -0700 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sat, 21 Mar 2020 00:31:13 +0000 Received: from hqnvemgw03.nvidia.com (10.124.88.68) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Sat, 21 Mar 2020 00:31:13 +0000 Received: from rcampbell-dev.nvidia.com (Not Verified[10.110.48.66]) by hqnvemgw03.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Fri, 20 Mar 2020 17:31:12 -0700 From: Ralph Campbell To: Jerome Glisse , John Hubbard , Christoph Hellwig , Jason Gunthorpe , "Andrew Morton" , Shuah Khan CC: , , , , "Ralph Campbell" Subject: [PATCH v8 0/3] mm/hmm/test: add self tests for HMM Date: Fri, 20 Mar 2020 17:31:05 -0700 Message-ID: <20200321003108.22941-1-rcampbell@nvidia.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-NVConfidentiality: public DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1584750661; bh=zYpRQ3kz35hjqDNLoNXpaNAgVIUKR+CRIyvN3RxU/8s=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: MIME-Version:X-NVConfidentiality:Content-Type: Content-Transfer-Encoding; b=ErrK7/OyuloQtImP831nTRcCemaDcTU5ejkOUV45jmN+v5nCuIUe+mA9FPdcRJD+4 a/UcP3z/tBG/cUFSzn6K403LNF5wk3jqunNhYpdT/ljNMESq+G9z/xNFqlBDCpGW0i QcOg0knQkbteuo4Lz1Nr39JxBYoV1tYWrrZPZroJJXlZFmv+jT/+kVyNlNkUZveh3x iT1R9kbEpM4e86yxN4PDjvSPil+K06SWGlB/7ETAvFaLJxeeYZu7nVm+ZyxdJ9PqoM 3nbinTCcrRyM1USmvYwZqFE5rS21BulAhbd2U2kyrCBbvOy0b68h6CMPnWwGm807Pp cgztSQUyL3RPA== 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 series adds basic self tests for HMM and are intended for Jason Gunthorpe's rdma tree which has a number of HMM patches applied. Changes v7 -> v8: Rebased to Jason's rdma/hmm tree, plus Jason's 6 patch series "Small hmm_range_fault() cleanups". Applied a number of changes from Jason's comments. Changes v6 -> v7: Rebased to linux-5.6.0-rc6 Reverted back to just using mmu_interval_notifier_insert() and making this series only introduce HMM self tests. Changes v5 -> v6: Rebased to linux-5.5.0-rc6 Refactored mmu interval notifier patches Converted nouveau to use the new mmu interval notifier API Changes v4 -> v5: Added mmu interval notifier insert/remove/update callable from the invalidate() callback Updated HMM tests to use the new core interval notifier API Changes v1 -> v4: https://lore.kernel.org/linux-mm/20191104222141.5173-1-rcampbell@nvidia.com Ralph Campbell (3): mm/hmm/test: add selftest driver for HMM mm/hmm/test: add selftests for HMM MAINTAINERS: add HMM selftests MAINTAINERS | 3 + include/uapi/linux/test_hmm.h | 59 ++ lib/Kconfig.debug | 12 + lib/Makefile | 1 + lib/test_hmm.c | 1177 +++++++++++++++++++++ tools/testing/selftests/vm/.gitignore | 1 + tools/testing/selftests/vm/Makefile | 3 + tools/testing/selftests/vm/config | 2 + tools/testing/selftests/vm/hmm-tests.c | 1353 ++++++++++++++++++++++++ tools/testing/selftests/vm/run_vmtests | 16 + tools/testing/selftests/vm/test_hmm.sh | 97 ++ 11 files changed, 2724 insertions(+) create mode 100644 include/uapi/linux/test_hmm.h create mode 100644 lib/test_hmm.c create mode 100644 tools/testing/selftests/vm/hmm-tests.c create mode 100755 tools/testing/selftests/vm/test_hmm.sh