Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1705267ybx; Thu, 31 Oct 2019 14:45:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqz98BDVRLqhoCTxayoYpi1FuArju9EskjR3uaraThTBzeAzdL/nasjpgOiwc+RfCZT3n9uU X-Received: by 2002:aa7:cb4a:: with SMTP id w10mr9022740edt.28.1572558309179; Thu, 31 Oct 2019 14:45:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572558309; cv=none; d=google.com; s=arc-20160816; b=C+Kd3argoQMSqH313CTrabEIV4o8Ufu+SaWKAcYRIRqvyvQQbCuTnGTXJjoJZJjiLs EkMRbYEV+QOEIV6f0pr1DT9NiDLOJxyiz+VRVK8/6xZpAoqjwPGoTmw/8f4pmNKLrSOk 38HjY3e5smpsWlE8vcjxMrVwi6E1hv3ytZTyE3PeoAD+y7W38ItHAREKcX90TrXuy8Zu ooKuyfsE9MRNLyRxEINPpLXDoyHez0QIq221baQFGJ9RfnjKt++pOKMCe+eomEGVcepL uq3MvWe3M78WSKjQGsGGumiorHZg7oCWBCb+CQC/lnvOEMplP3p0AfVaOf1gQ2/V7wpi 6xyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Wr3SVeuoH5XlM7NZPBlWqcbSTjspk3irIYRvlGi9yaI=; b=lhBq8Cz5H3dcpg8QxwK4XNiSvPpMCcJod6YNv6jGxtmUCtmtueKNSW7RpCyFzK/6nR Wprzy1aACE/YfCxApVVDr8oAEXLM/ItwyWWI4QRRFQM30A6XXaZGuGddJKfHg+PRLx3K rh9KQciVzzPMJ1uWfnMuROoJ0oI7Fso9+XI8rF9niqPbpj4Q8+9nUH4MEF45j33/CagF 21vVfymB65nwWYGqNWR+b5LlcbFulXMnKDA4HOqzyjK/tHQDAfwMjAQCrGm9+SXdd5kc cVjstRdNjhYgrR/C/lGcOEAp+0Ij9ntxdMJO60g/Gq3+kty+izdzKv58vTGNzqRA8JcY XQ4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=kW174yLM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n14si4537840ejx.354.2019.10.31.14.44.46; Thu, 31 Oct 2019 14:45:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=kW174yLM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728975AbfJaR2R (ORCPT + 99 others); Thu, 31 Oct 2019 13:28:17 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:6913 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728561AbfJaR2R (ORCPT ); Thu, 31 Oct 2019 13:28:17 -0400 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== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.