Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp746310ybz; Wed, 15 Apr 2020 18:03:59 -0700 (PDT) X-Google-Smtp-Source: APiQypLj275zseZDd8CJud+ZbKSbii25YhwSsY41Co3wxUkOI4We7LWNW92g1HoUkQZfJCy/5wIk X-Received: by 2002:a17:906:70f:: with SMTP id y15mr7627553ejb.276.1586999039273; Wed, 15 Apr 2020 18:03:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586999039; cv=none; d=google.com; s=arc-20160816; b=aSVUM5CRnh8pSuVsOAWICpwZ8WQywyzvq3rBvAk9Ij8To/DxKHUq4LhlyrOLDsXh22 U6PHpb4kG07tFTqICgPvNeqJ6veUBVRVl6/LWoPuMa6cbLl5eBoH/QG0F8O+As2pZFZB 4oPv/j1c7VoplxoDECIqOWnzufJPeCVM328OOq7ZapyWGP105ESoHLm02gFoLNjXDbC4 ksSfWeuPj+YEoyQ2pjradcsuX2uIYiQjm1LywqTisufU4T65AMZ+Ik9iknN4b2DnHCgE Fxn8PlxUucbKLuTRxFpuVFKWve9dwwJhMwvnyCoi4ZTLgxzGSGBlhGsTmkOZ9ht0tn76 Dhhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=qkEh7DHJWmlyQhFvosvSTEnw9cBQNhVK//hVJ0TeKAs=; b=cYWW5aNjFU/16f1OSZAzAzcjiQbYwhflTdLVoexupqnU6PJ6norBpWBpg58+h7zBWa Nifo5bYK1iXp3WRXoiXLeF8f+h89HK7sS5qsEUd6Sjr3DMadqFm7YhQi1CAZMhYJb7Wb s/3sOwGQqG3liKK+xmde0Eulzu80PqRj1+pA4Yt3ZAyK3YPmzu73g+Azk7GcQiq+J2fN XXUZPnedStHgh3zxus3JDlF8b1N+px3Bc/U0ZVMfylXEL3OomrLuqX0uZR+Ol8yGE5i3 uCTPv2w04OkiwA59MJyv+J7cuUQWCDsUkou0w+oeN/lOKARsGqvKXO4fpFoRuLRAPSHx ijow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=18LdT+B4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a7si11354875edr.568.2020.04.15.18.03.36; Wed, 15 Apr 2020 18:03:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=18LdT+B4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441785AbgDOTaE (ORCPT + 99 others); Wed, 15 Apr 2020 15:30:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:55134 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437842AbgDOT37 (ORCPT ); Wed, 15 Apr 2020 15:29:59 -0400 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 DF1C520774; Wed, 15 Apr 2020 19:29:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586978998; bh=HcxMWDYswwSk16CJXI7QG7JgXa8lgyRgaEpGjU1zGT0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=18LdT+B4dO4XKOdbgBT1rE8jARtHpNmRaiCUmOgAu7rk7jVGCFxtr+tTfUMqwFGMb ZwOKmWfXgpuNviXjE3qZRnMwSGRgYlnHg58T1M11d7ZNU+5XtsnBJ2aZm+ICz2SDNL E2mRQsg8FYQQ6dpMXrqfeg6ciZ+MBeHYlRos5IFY= Date: Wed, 15 Apr 2020 22:29:52 +0300 From: Leon Romanovsky To: Ralph Campbell Cc: Jason Gunthorpe , 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: <20200415192952.GA1309273@unreal> References: <20200321003108.22941-1-rcampbell@nvidia.com> <20200415144125.GU11945@mellanox.com> <6d7adb28-96a0-5dc5-e85e-68fca2db403a@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6d7adb28-96a0-5dc5-e85e-68fca2db403a@nvidia.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 15, 2020 at 10:28:23AM -0700, Ralph Campbell wrote: > > On 4/15/20 7:41 AM, Jason Gunthorpe 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. > > > > Here are some hunks I noticed while testing this: > > > > --- a/lib/Kconfig.debug > > +++ b/lib/Kconfig.debug > > @@ -2201,7 +2201,8 @@ config TEST_MEMINIT > > config TEST_HMM > > tristate "Test HMM (Heterogeneous Memory Management)" > > - depends on DEVICE_PRIVATE > > + depends on TRANSPARENT_HUGEPAGE > > + select DEVICE_PRIVATE > > select HMM_MIRROR > > select MMU_NOTIFIER > > help > > > > It fails testing if TRANSPARENT_HUGEPAGE is not on > > > > @@ -1097,6 +1071,7 @@ static int dmirror_device_init(struct dmirror_device *mdevice, int id) > > spin_lock_init(&mdevice->lock); > > cdev_init(&mdevice->cdevice, &dmirror_fops); > > + mdevice->cdevice.owner = THIS_MODULE; > > ret = cdev_add(&mdevice->cdevice, dev, 1); > > if (ret) > > return ret; > > > > The use of cdev without a struct device is super weird, but it still > > needs this > > > > diff --git a/tools/testing/selftests/vm/test_hmm.sh b/tools/testing/selftests/vm/test_hmm.sh > > index 461e4a99a362cf..0647b525a62564 100755 > > --- a/tools/testing/selftests/vm/test_hmm.sh > > +++ b/tools/testing/selftests/vm/test_hmm.sh > > @@ -59,7 +59,7 @@ run_smoke() > > echo "Running smoke test. Note, this test provides basic coverage." > > load_driver > > - ./hmm-tests > > + $(dirname "${BASH_SOURCE[0]}")/hmm-tests > > unload_driver > > } > > > > Make it runnably reliably > > > > Jason > > Thanks for the fixes. I'll apply these and send a v9. > I will also add missing calls to release_mem_region() to free the reserved device private > addresses. If you decide to ignore my request to avoid addition of special header file to UAPI, at least don't copy and install that file without some special CONFIG option (TEST_HMM ???) requested by the users. It also will be good to get Acked-by on this change from HMM people. However, I still think that include/uapi/linux/test_hmm.h opens pandora box of having UAPI files without real promise to keep it backward compatible. Thanks >