Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp879810ybl; Fri, 16 Aug 2019 05:35:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0ce6gKX7mPSvfKiuTnrxeL1dGcafF/bogNETHpbT+Lqs2/++QAre/xpJUffAkiK7ACpB3 X-Received: by 2002:a17:902:42a5:: with SMTP id h34mr9396631pld.16.1565958951966; Fri, 16 Aug 2019 05:35:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565958951; cv=none; d=google.com; s=arc-20160816; b=A/7fTJcXU6EUgI8vgBulep7RGdcYNTLIK0gA5KsEAUaqVofB9TR3deFZJTuSDFDqe3 hytxk5asocynCHtb4lITLhNlms2Hnx8jph6ihQ3kEnpeiM+eCsVE/AdhH6nfWZaXVtlQ aNr2L8MK17omZC5yPfl1R/HbjZbf3s+Xm1Ug6W9K9bbIwB5Hmrf3hT4rT6xnkIX/+S5c 2OKiv3bqOsstX7t61bLABHKxWL/DNrDERJeqPi2KyJyb8CCs2mCrPBT8AUeh3qqcGD5u u62nj0ZhEZwJV9x8i/mP9KMI5jajzf++XRB+Ktd6Y2PhXeFiktHDCUaCLO3JWIO5PnJa jy8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=IPP0WfHCrNY/k0i7u7M36jzLzW3X1IFOPTrJOcUdMGU=; b=xRo7X50sh5BbjsTsUNfo1AA0kziNNIa8jnG6J1tOruXqGYaJrZdDulpjHOPA1cgAdk 8aCWfkFWbLu/yS5DgE7Q4e66jyPGzZyOHxZiYrhAycXwxHSu3w0Rp85loZB58+MYTRck UQvMkmukXNnpNIjtbZboYriidsAg5HB9ixVnzLJy6+u792596jT8tZ6cc5hqH5FRfoOk rFz1K3CVEAJNTAGSM3y74jVHWi6GdGrJ/H18O6S65JLKX1FqknYx3CzGr6ZQreBlnXYb tEhcNta99sBPAeiMPJnbsSdZx0oguEqq+DzkHb8SR5Bls1aeIqYuY1wU1JXKzTDpm/aL JwXA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 64si4076722plw.37.2019.08.16.05.35.34; Fri, 16 Aug 2019 05:35:51 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727338AbfHPMeP (ORCPT + 99 others); Fri, 16 Aug 2019 08:34:15 -0400 Received: from verein.lst.de ([213.95.11.211]:55173 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726981AbfHPMeP (ORCPT ); Fri, 16 Aug 2019 08:34:15 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id E3D2B68B05; Fri, 16 Aug 2019 14:34:12 +0200 (CEST) Date: Fri, 16 Aug 2019 14:34:12 +0200 From: Christoph Hellwig To: Jason Gunthorpe Cc: Christoph Hellwig , Jerome Glisse , Dan Williams , 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" Subject: Re: [PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk Message-ID: <20190816123412.GB22140@lst.de> References: <20190815180325.GA4920@redhat.com> <20190815194339.GC9253@redhat.com> <20190815203306.GB25517@redhat.com> <20190815204128.GI22970@mellanox.com> <20190815205132.GC25517@redhat.com> <20190816004303.GC9929@mellanox.com> <20190816044448.GB4093@lst.de> <20190816123036.GD5412@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190816123036.GD5412@mellanox.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 16, 2019 at 12:30:41PM +0000, Jason Gunthorpe wrote: > > For instance, a system may have multiple DEVICE_PRIVATE map's owned by > the same driver - but multiple physical devices using that driver. > > Each physical device's driver should only ever get DEVICE_PRIVATE > pages for it's own on-device memory. Never a DEVICE_PRIVATE for > another device's memory. > > The dev_pagemap_ops would not be unique enough, right? True. > > Probably also clusters of same-driver struct device can share a > DEVICE_PRIVATE, at least high end GPU's now have private memory > coherency busses between their devices. > > Since we want to trigger migration to CPU on incompatible > DEVICE_PRIVATE pages, it seems best to sort this out in the > hmm_range_fault? > > Maybe some sort of unique ID inside the page->pgmap and passed as > input? Yes, we'll probably need an owner field. And it's not just hmm_range_fault, the migrate_vma_* routines as affected in the same way.