From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BF80C43332 for ; Sun, 22 Mar 2020 08:10:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A98A720774 for ; Sun, 22 Mar 2020 08:10:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="L24eYQEH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A98A720774 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2CE0C6B0003; Sun, 22 Mar 2020 04:10:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 27EDE6B0006; Sun, 22 Mar 2020 04:10:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 16DA86B0007; Sun, 22 Mar 2020 04:10:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id F1B656B0003 for ; Sun, 22 Mar 2020 04:10:43 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B524652A0 for ; Sun, 22 Mar 2020 08:10:43 +0000 (UTC) X-FDA: 76622276766.04.cap52_5d9eab0635422 X-HE-Tag: cap52_5d9eab0635422 X-Filterd-Recvd-Size: 4248 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Sun, 22 Mar 2020 08:10:43 +0000 (UTC) Received: from localhost (unknown [213.57.247.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 88E0E20722; Sun, 22 Mar 2020 08:10:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584864642; bh=2Q5vrn72Xm0DFK1rhozsPFjcLu4nBGHSn0WW/B4hy6k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=L24eYQEHtPNVXBgXPI6F87X2FZP066Z7WvO/y4nzDz8C3IEcAyT7ngAk7oNGA+29i ZYi8wigGkqhCS04qXfoeKuTSp6qD+ngU2Zp4KEcDEe8mhHXcAhJQ7aL/yiNNjoQp4z 66NjEGhMK1JQPwXCQKE7eH+ciL6zOJZqUPgb3rEI= Date: Sun, 22 Mar 2020 10:10:38 +0200 From: Leon Romanovsky To: Jason Gunthorpe Cc: Ralph Campbell , Jerome Glisse , John Hubbard , Christoph Hellwig , Andrew Morton , Shuah Khan , linux-rdma@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v8 0/3] mm/hmm/test: add self tests for HMM Message-ID: <20200322081038.GG650439@unreal> References: <20200321003108.22941-1-rcampbell@nvidia.com> <20200321090047.GM514123@unreal> <396f0c30-4a49-6a18-ff02-a73ee1a09883@nvidia.com> <20200321215505.GW20941@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200321215505.GW20941@ziepe.ca> 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: On Sat, Mar 21, 2020 at 06:55:05PM -0300, Jason Gunthorpe wrote: > On Sat, Mar 21, 2020 at 10:27:46AM -0700, Ralph Campbell wrote: > > > > On 3/21/20 2:00 AM, Leon Romanovsky wrote: > > > On Fri, Mar 20, 2020 at 05:31:05PM -0700, Ralph Campbell wrote: > > > > 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 ++ > > > > > > Isn't UAPI folder supposed to be for user-visible interfaces that follow > > > the rule of non-breaking user space and not for selftests? > > > > > > Thanks > > > > > > > Most of the other kernel module tests seem to invoke the test as part of the > > module load/init. I'm open to moving it if there is a more appropriate location. > > Is it even possible to create a user mm_struct and put crazy things in > it soley from a kernel module? I didn't look very closely of what Ralph did in his patchsets, but from what I know, if you want in-kernel interface, you use in-kernel module, if you want to test user visible uapi, you write application. You don't create new UAPI just to test something in the kernel. Can kunit help here? https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html Thanks > > Jason >