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=DKIMWL_WL_HIGH,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 14A42CA9ECB for ; Thu, 31 Oct 2019 17:28:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D27EA2086D for ; Thu, 31 Oct 2019 17:28:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="kW174yLM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D27EA2086D 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 714956B000D; Thu, 31 Oct 2019 13:28:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6C5806B000E; Thu, 31 Oct 2019 13:28:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5B4136B0010; Thu, 31 Oct 2019 13:28:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0183.hostedemail.com [216.40.44.183]) by kanga.kvack.org (Postfix) with ESMTP id 338CE6B000D for ; Thu, 31 Oct 2019 13:28:20 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id A99EB181AEF10 for ; Thu, 31 Oct 2019 17:28:19 +0000 (UTC) X-FDA: 76104763518.16.form60_82aad67826634 X-HE-Tag: form60_82aad67826634 X-Filterd-Recvd-Size: 4272 Received: from hqemgate15.nvidia.com (hqemgate15.nvidia.com [216.228.121.64]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Thu, 31 Oct 2019 17:28:17 +0000 (UTC) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 31 Oct 2019 10:28:23 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Thu, 31 Oct 2019 10:28:16 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Thu, 31 Oct 2019 10:28:16 -0700 Received: from rcampbell-dev.nvidia.com (172.20.13.39) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 31 Oct 2019 17:28:12 +0000 Subject: Re: [PATCH v3 3/3] mm/hmm/test: add self tests for HMM To: Jason Gunthorpe CC: Jerome Glisse , John Hubbard , Christoph Hellwig , "linux-rdma@vger.kernel.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" References: <20191023195515.13168-1-rcampbell@nvidia.com> <20191023195515.13168-4-rcampbell@nvidia.com> <20191029175837.GS22766@mellanox.com> <3ffecdc6-625f-ebea-8fb4-984fe6ca90f3@nvidia.com> <20191029231255.GX22766@mellanox.com> <20191031124200.GJ22766@mellanox.com> From: Ralph Campbell X-Nvconfidentiality: public Message-ID: Date: Thu, 31 Oct 2019 10:28:12 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: <20191031124200.GJ22766@mellanox.com> X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1572542903; bh=Wr3SVeuoH5XlM7NZPBlWqcbSTjspk3irIYRvlGi9yaI=; h=X-PGP-Universal:Subject:To:CC:References:From:X-Nvconfidentiality: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=kW174yLMG8IjxnIxZyGrbC9l4pJLEDIfwedwqdfEYw/0iC+ttgHPBJLMZkyCYUOr+ RmxUpyuuyis4YF6MLdl87jl0c7oyLblhWSadJUmnz1jEpOCgr23NZvbKblPTnLtGgs F3C9AzLpFbe7EdbSmOJuem4Dc/OwsHeYevbSFMW2WlRNqRjQ0tLgmrujoxfb20sx1S O7fLhLdjM5wM1kN93p9JjJXAvPayJPHH6IpfoERTCjwB492x//hykF6/MCqr0jmn7b Q2/7fafKcaLwisg3k/YFqZ32xQkOEgoUivOon5ozWNgTbjxXT0nmbjOPmOykMNz16X VpmUH5ZVPU//Q== 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 10/31/19 5:42 AM, Jason Gunthorpe wrote: > On Wed, Oct 30, 2019 at 05:14:30PM -0700, Ralph Campbell wrote: > >>> Well, that is good, is it also under drivers/char? It kind feels like >>> it should not be there... >> >> I think most of the test modules live in lib/ but I wasn't sure that >> was the right place for the HMM test driver. >> If you think that is better, I can easily move it. > > It would be good to get the various test people involved in this, I > really don't know. OK. >>>>> It seems especially over-complicated to use a full page table layout >>>>> for this, wouldn't something simple like an xarray be good enough for >>>>> test purposes? >>>> >>>> Possibly. A page table is really just a lookup table from virtual address >>>> to pfn/page. Part of the rationale was to mimic what a real device >>>> might do. >>> >>> Well, but the details of the page table layout don't see really >>> important to this testing, IMHO. >> >> One problem with XArray is that on 32-bit machines the value would >> need to be u64 to hold a pfn which won't fit in a ULONG_MAX. >> I guess we could make the driver 64-bit only. > > Why would a 32 bit machine need a 64 bit pfn? > > Jason > On x86, Physical Address Extension (PAE) uses a 64 bit PTE. See arch/x86/include/asm/pgtable_32_types.h which includes arch/x86/include/asm/pgtable-3level_types.h.