Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1913274imu; Sat, 8 Dec 2018 09:48:31 -0800 (PST) X-Google-Smtp-Source: AFSGD/VKqu6Mhv5zzAMd+yMpdbHra7ftb8gxRzl9ykzTVvDkm7F5RL65V11qxk0A+DOHYvDtO0PY X-Received: by 2002:a62:5003:: with SMTP id e3mr6773249pfb.23.1544291311849; Sat, 08 Dec 2018 09:48:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544291311; cv=none; d=google.com; s=arc-20160816; b=kt8Is/6cG3HIsVHiHwvKtccl2CThhIuFDpvTwmjsWjQ0Gyr8rTPm4SBcK/RYb01wpp 817QuK1inFXGz5Jk8ll3PwtsnUxFhtqXoJbOLj/WubM0H5veFW9aeqyR0PwJmcZFTk/D rm3KljZpH0IsZoFYIb+/X2YP+zAtURMDmdSAM0tj57sYtFk7km5p68b75c0FC/NZgE+u FC7nwD5hhN6+yxAXRBGqoQWi+fUb+baJm8rb0bLFQnBVtdXV+a8AG5SJtRVaMgRXG5ML Ixz7tKhWBjR9J0k9NJWlNuByqthZqM0ud2+cp9mSRxj4MWLJf6+xWehSXq4xIxxVOiUO ru2Q== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=M3ZLStnTjHpOWk3ndMKY82SMfs2xifHE4SgDlrY9jLs=; b=a1tVu62ax+yCSQc32/vVi8DeOleGQnocHwM30Bghis+N9XD/68JVSKUKv6aZr+Kzwr pxK5Lo8zr+lk2oH1zDho9++hz4FFGfTHWD5XapB5CpjhMaonat5NkxLerV4XhZA2o2kD jxhBCfbamnGomE7U7kMfUzFqhAlx8v7ZfqhG3yI1L0l60UFVtwfFZlW0gZuNhqRn7Btl sW4z5+atOec54KRWOOV3fFwiXkVSoRlJ3DdxQGoFEA82sjT5ggVDTtVWqGl0sFa8IxYx TwQHxDnRoeP22uP03D1fAk8mIoxvNXynsRTIewpaq0H5HhHdzy7qvPzLdxKlDliaqJ15 wvsA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j11si6054708plb.253.2018.12.08.09.48.14; Sat, 08 Dec 2018 09:48:31 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726203AbeLHRrg (ORCPT + 99 others); Sat, 8 Dec 2018 12:47:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44844 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726168AbeLHRrg (ORCPT ); Sat, 8 Dec 2018 12:47:36 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8BFB6394D58; Sat, 8 Dec 2018 17:47:35 +0000 (UTC) Received: from redhat.com (ovpn-120-239.rdu2.redhat.com [10.10.120.239]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8F80D60BE8; Sat, 8 Dec 2018 17:47:32 +0000 (UTC) Date: Sat, 8 Dec 2018 12:47:30 -0500 From: Jerome Glisse To: Christoph Hellwig Cc: Dan Williams , John Hubbard , Matthew Wilcox , John Hubbard , Andrew Morton , Linux MM , Jan Kara , tom@talpey.com, Al Viro , benve@cisco.com, Christopher Lameter , "Dalessandro, Dennis" , Doug Ledford , Jason Gunthorpe , Michal Hocko , Mike Marciniszyn , rcampbell@nvidia.com, Linux Kernel Mailing List , linux-fsdevel Subject: Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions Message-ID: <20181208174730.GB2952@redhat.com> References: <3c91d335-921c-4704-d159-2975ff3a5f20@nvidia.com> <20181205011519.GV10377@bombadil.infradead.org> <20181205014441.GA3045@redhat.com> <59ca5c4b-fd5b-1fc6-f891-c7986d91908e@nvidia.com> <7b4733be-13d3-c790-ff1b-ac51b505e9a6@nvidia.com> <20181207191620.GD3293@redhat.com> <3c4d46c0-aced-f96f-1bf3-725d02f11b60@nvidia.com> <20181208163353.GA2952@redhat.com> <20181208164825.GA26154@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181208164825.GA26154@infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Sat, 08 Dec 2018 17:47:35 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Dec 08, 2018 at 08:48:25AM -0800, Christoph Hellwig wrote: > On Sat, Dec 08, 2018 at 11:33:53AM -0500, Jerome Glisse wrote: > > Patchset to use HMM inside nouveau have already been posted, some > > of the bits have already made upstream and more are line up for > > next merge window. > > Even with that it is a relative fringe feature compared to making > something like get_user_pages() that is literally used every to actually > work properly. > > So I think we need to kick out HMM here and just find another place for > it to store data. > > And just to make clear that I'm not picking just on this - the same is > true to a just a little smaller extent for the pgmap.. Most of the user of GUP are well behave (everything under driver/gpu and so is mellanox driver and many other) ie they abide by mmu notifier invalidation call backs. They are a handfull of device driver that thought they could just do GUP and ignore the mmu notifier part and those are the one being problematic. So to me it feels like bystander are be shot for no good reasons. I proposed an alternative solution to this GUP thing and i don't think it is a crazy one and thinking about it we only need to do that for file back page so we can leave untouch the anonymous page case. This would put a small burden on the user of GUP (by the way i am working on removing GUP from drivers/gpu and other well behave driver, patch posted on dri-devel for some of the GPU already). So why not explore my idea and see if they are any roadblock on it. Cheers, J?r?me