Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp908875ybl; Wed, 14 Aug 2019 07:49:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqzb7+xbTGmByH9Tmp1ldMjOrcLGGiA3WHYHwbLIgRizJMDeflraKDgvnC8zNToIIwROPNIC X-Received: by 2002:a62:e910:: with SMTP id j16mr285610pfh.123.1565794182056; Wed, 14 Aug 2019 07:49:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565794182; cv=none; d=google.com; s=arc-20160816; b=jKA+bQKblj/9DRvgJH2wm21JuBpsVbyMzBH4PAhHiCIKOk1UExatjt4VTdzVo1Y8hO aI2xq4txieJspWCRINnUaY82x5tCRVKGDtBSTIhphiEo0KZLabNjkg4HUjaO5eKUIL/C E8OYA4aED8S5/FNyfJCXwr/mqNASFqOL9ciihrnZPosLliauollXOl2qXnNEO+cEroE+ +KhZdQU+4TxEESW3qCzvQmcaeBTzxyhcXrFspkiyfGcg8OMwvs8ekL3pCmxAu7RKOBl7 +GUqzzE9teD/9FvvJ/hDkbvJq685JqAIMNdq7E/j8AzsnnmtqWjcP5ea/Wac0dfA2DpT U0Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=TuidyYaeRyKNuzkufRgN6Ec9LRr2Ifgbce3UwZKDqAk=; b=L4r5sx87yNro0lsS/7HRxjm9e5K8Yd4Y279yr1oiUoh26sdzWTFGUK56K13RFk1JfV lTLjIMs6AtO7Oeb5BZaw8otJOgW2lwps8zEoUTokzUn/tHWbXSnbUN3UBZSSGWWvBtnw vkHag1MOKqA248EJjqkA0GXiRRkTrW800nIzmh0mB8a+6CAkgz3N5E3fgUfNclyd+DFT 2avtGtBW67uogVAN3YjST3ok5KO+xoTWn2CSclFB3/L2qMqdlqGCSfiSKXJpsMX1Mz95 xPV0n8QJrqOpneDH+qZ/Cj69DAQ0kprWggwpADfSAiz/XsB0KYNTdJajzYVJ/hMRw9Fz g7yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=VGmsuSut; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 30si8114pjz.30.2019.08.14.07.49.25; Wed, 14 Aug 2019 07:49:42 -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=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=VGmsuSut; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727961AbfHNOsj (ORCPT + 99 others); Wed, 14 Aug 2019 10:48:39 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:38284 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbfHNOsj (ORCPT ); Wed, 14 Aug 2019 10:48:39 -0400 Received: by mail-ot1-f67.google.com with SMTP id r20so33082993ota.5 for ; Wed, 14 Aug 2019 07:48:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TuidyYaeRyKNuzkufRgN6Ec9LRr2Ifgbce3UwZKDqAk=; b=VGmsuSutDmh/CjlBsd4sxqgbi8um+dCHzh+K0g76f30mKTKa4vnjEUi5IghOvDT2TU IiuduD1hp/FbpMVaMr/e7wBsaqMWdJ6XHtQ/1mBsBItSP4Wnk6xfU27TabVrZ7CxNxNQ xk36x4tWlqqM3zgQ+imkzsVY04ipeNiKK+QA1YnFVauQbb2Je88bjQTJ7UYiJXdobeSQ 8yXovyKKvS5GfjCCiA8ng2LVaXxNaFUycGFOD1MJp5B3wtPnD6SMS1YSM8AN/j0ewy4K 946ksv8AZDHbxIlpfzizsK/Ykelqs/5V6AZKhURom457TIKDaqNjmkxGJQw/75l6BLCF rGkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TuidyYaeRyKNuzkufRgN6Ec9LRr2Ifgbce3UwZKDqAk=; b=HANDBtMW8EKKlY8RsbtcK/opd8nFpcOjjc8E1wsJkZxuqyEaV+fwAUy77+Foclk+5v WK+JYK3pZr47fRuc3MsfwJyxdnC6ukZOeBcFWXSdN859GDR2GY3k/WdOhUCSPYvi1NUw 9s/ZCDBxgLuU8IZ9VOtVpFOLMdX6fDs2HJpKz5bsZxYYYZHfVrhbc8Y7g1yAMoPV+Zr1 3lmrCp2lJnAzZuyRG45Lp8s7oF5GIJj6ZFKNgqiqr8fXJ9QA3dTzQ5Xbo53+a5i+Fgbf It04ijXzWNcLpB/WO0d4mPxIs3TK/6LwHRs2/B0QEwwOl7YVqMDPi58S0a1Bc4pNDtRR SnCQ== X-Gm-Message-State: APjAAAWqQIc21CBS0Jyxiwda/OoaXT5ktcusY5aXx2DrQeODaDjPJaOl jheW8DMkcaBSqzsjq69W18rfofU1GBq1QALdj2XFxg== X-Received: by 2002:a9d:6b96:: with SMTP id b22mr2732383otq.363.1565794118373; Wed, 14 Aug 2019 07:48:38 -0700 (PDT) MIME-Version: 1.0 References: <20190806160554.14046-1-hch@lst.de> <20190806160554.14046-5-hch@lst.de> <20190807174548.GJ1571@mellanox.com> <20190808065933.GA29382@lst.de> <20190814073854.GA27249@lst.de> <20190814132746.GE13756@mellanox.com> In-Reply-To: <20190814132746.GE13756@mellanox.com> From: Dan Williams Date: Wed, 14 Aug 2019 07:48:28 -0700 Message-ID: Subject: Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk To: Jason Gunthorpe Cc: Christoph Hellwig , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Ben Skeggs , Felix Kuehling , Ralph Campbell , "linux-mm@kvack.org" , "nouveau@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" , "amd-gfx@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 14, 2019 at 6:28 AM Jason Gunthorpe wrote: > > On Wed, Aug 14, 2019 at 09:38:54AM +0200, Christoph Hellwig wrote: > > On Tue, Aug 13, 2019 at 06:36:33PM -0700, Dan Williams wrote: > > > Section alignment constraints somewhat save us here. The only example > > > I can think of a PMD not containing a uniform pgmap association for > > > each pte is the case when the pgmap overlaps normal dram, i.e. shares > > > the same 'struct memory_section' for a given span. Otherwise, distinct > > > pgmaps arrange to manage their own exclusive sections (and now > > > subsections as of v5.3). Otherwise the implementation could not > > > guarantee different mapping lifetimes. > > > > > > That said, this seems to want a better mechanism to determine "pfn is > > > ZONE_DEVICE". > > > > So I guess this patch is fine for now, and once you provide a better > > mechanism we can switch over to it? > > What about the version I sent to just get rid of all the strange > put_dev_pagemaps while scanning? Odds are good we will work with only > a single pagemap, so it makes some sense to cache it once we find it? Yes, if the scan is over a single pmd then caching it makes sense.