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=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 CE6E0C54FCF for ; Mon, 23 Mar 2020 18:25:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8AE9B20719 for ; Mon, 23 Mar 2020 18:25:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="X1CH1GVl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8AE9B20719 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2437B6B000A; Mon, 23 Mar 2020 14:25:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1CC3D6B000C; Mon, 23 Mar 2020 14:25:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 094CE6B000D; Mon, 23 Mar 2020 14:25:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0197.hostedemail.com [216.40.44.197]) by kanga.kvack.org (Postfix) with ESMTP id E0B2F6B000A for ; Mon, 23 Mar 2020 14:25:36 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id AA71E18078DDA for ; Mon, 23 Mar 2020 18:25:36 +0000 (UTC) X-FDA: 76627455072.08.pigs31_88433dfa38b4f X-HE-Tag: pigs31_88433dfa38b4f X-Filterd-Recvd-Size: 6344 Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Mon, 23 Mar 2020 18:25:36 +0000 (UTC) Received: by mail-qt1-f196.google.com with SMTP id d12so10144894qtj.4 for ; Mon, 23 Mar 2020 11:25:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vz1jTrOHhlau0BRekH82JXjI9Z5PbbRoxtyzM7wcGdk=; b=X1CH1GVltCQdj8DdoNqavN4roarwwcB2hsCI+XK3JzbOgASZx+Kj0guGgixCarN8m0 yF2zg//qewNml70VOfqydcfIUG+A+LDNw/5cOdFrrzvjH2jdApwlKvzNHtKc2IQ64Swd mHOw6pLeTWAUiIEPs6ybgnFPu3hBO9khxJylZH+SUZRhIssZwakCeu0K1kh7VrNc51rE lMoPT/HMzDOrtYXL2z+uty/6LPVxYustbdL93bBBPzXMnQ8fZQvs7hzC2gHoQS2AwalO lUajioxU2lilEs7I3w159QXUk9BYngxYjRdibBQCvubenXNFUK/MoOVOhXgQJwZKJni9 ZHLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vz1jTrOHhlau0BRekH82JXjI9Z5PbbRoxtyzM7wcGdk=; b=Hj9vhVEzouPOK5wu95k16g0hvmCyF/PMb3Ez5v81z6wE/ReR8UgcVKte2xiDXQnVB3 EIuaIUYhWmYuZFaJTS5apFxrauUhndRPJeTeGaGqLxNSFSpncEHYgeudOvbV335pueCV RlANDTpSYezThdmfC/IAZTI5tjTutsIzDnJdXOdVUD7wCzVhz/u/BpB8YovS4qg+mxXT xjNgryCpGe9UOPx+JmGXpeKjAdyMtYty6MatsvhNUU7bA4Q4vdQYnGmOruNa0QoAtNYU NUA5/K8AvyRNyph4JpYk35inpegVW/5lbU1pjUSupsKKBO7q4Pn9gb9KDPU8yYj59iyn +PVA== X-Gm-Message-State: ANhLgQ2kYkWnPyTQkaW4abCiqr06m1iwsSjgOa+DOWaJZemi/eVqdCDJ h2JUdHhGjRHPfwRieDwEoeQ1GQ== X-Google-Smtp-Source: ADFU+vsib7u44SXaJjB6F+7ycgLvU7K9p2KA3EjlB2X4Tm1ey09SO8RfuMz6qlyjf9wDCQFwfID/9g== X-Received: by 2002:ac8:6b54:: with SMTP id x20mr22673141qts.41.1584987935620; Mon, 23 Mar 2020 11:25:35 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-68-57-212.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.57.212]) by smtp.gmail.com with ESMTPSA id o67sm11050065qka.114.2020.03.23.11.25.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Mar 2020 11:25:35 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1jGRlW-0007K3-F2; Mon, 23 Mar 2020 15:25:34 -0300 Date: Mon, 23 Mar 2020 15:25:34 -0300 From: Jason Gunthorpe To: Leon Romanovsky 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: <20200323182534.GD20941@ziepe.ca> References: <20200321003108.22941-1-rcampbell@nvidia.com> <20200321090047.GM514123@unreal> <396f0c30-4a49-6a18-ff02-a73ee1a09883@nvidia.com> <20200321215505.GW20941@ziepe.ca> <20200322081038.GG650439@unreal> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200322081038.GG650439@unreal> User-Agent: Mutt/1.9.4 (2018-02-28) 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 Sun, Mar 22, 2020 at 10:10:38AM +0200, Leon Romanovsky wrote: > 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. That works fine as long as the in-kernel interfaces don't require user created objects like mm_struct and vmas, which is the case here. So there must be some special uAPI between the kerne/user to make it work. Jason