Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1954584imu; Sat, 8 Dec 2018 10:47:30 -0800 (PST) X-Google-Smtp-Source: AFSGD/VpdqKiOHQyPOjCImiD0wysuyUokIOgq/M9WMcpDVAngq8XLRFP8zpH0s8KLr+QOCCRESAx X-Received: by 2002:a17:902:112c:: with SMTP id d41mr6303144pla.144.1544294850213; Sat, 08 Dec 2018 10:47:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544294850; cv=none; d=google.com; s=arc-20160816; b=B0X+LLF57SM0kzYpmcupdLj0XwblE6XcN9oKr/ILGfNj6eqos5GYkZiM0vvkv2HASJ NkcdeCr5Qf/3ftzPnlqOPzbAa6S8OeDETjsFhDHannLzlOt97yeMzziyAxgvFnMergbS jwQY+aE5YwECpOGVvrfydR1MRq5mFUL1UJqYg5bkoWRYbwZXjMYxau4U+otKYy7VfGbi e5hjTb8XJ6wn72Y/n81lJosCsgAJZkvr9QCsz8ouom1g/8Oe7wZTeDVFUM3H3lHOLTwc ch/vWa0bbFHHyz9fPNmvouYWcvOw+nRz/95M6cCdzPsW6IML/ttXJYadYXd9LrDzNR0G jA3Q== 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=RzUW0Toy4QPWo5w9H/PLzEVzjrpkIqY94jv+mhXavs4=; b=R9LSWNQsGm2Oq06h38XfdYkb8OGmCKOOrIZya03VPMqPJ21cKMVMevtXpkOjSzut97 PwGTzwW/mwu3CNTFboaKuSL6VnQGW7awMl5dMmJEuJamoa86K5MLwC4MgO10kt+9iOlI SWKoKM+YeBMGvr73qAEkK2buTS9Co9Ef15TZZ1AyUct2NMnm/57mxOZXUPyamsJ2PneL 8avGsR4rw5JPaPAkKcWx6hhcn8pyyCoExFe28rgQ3Cona5H7ETov59023Wl+vcwoHj9F tA/wrJUZpfU83cDYDvf+U+bzwLJGxWonk5ZPZP33tl340VB/uf2fA8JHYVF5JqAeGsPi HaQA== 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 q24si5902399pls.325.2018.12.08.10.47.14; Sat, 08 Dec 2018 10:47:30 -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 S1726232AbeLHSpc (ORCPT + 99 others); Sat, 8 Dec 2018 13:45:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:17364 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726174AbeLHSpb (ORCPT ); Sat, 8 Dec 2018 13:45:31 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0BE4E300441B; Sat, 8 Dec 2018 18:45:31 +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 7D3B619C7C; Sat, 8 Dec 2018 18:45:28 +0000 (UTC) Date: Sat, 8 Dec 2018 13:45:26 -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: <20181208184525.GC2952@redhat.com> References: <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> <20181208174730.GB2952@redhat.com> <20181208182604.GA24564@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181208182604.GA24564@infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Sat, 08 Dec 2018 18:45:31 +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 10:26:04AM -0800, Christoph Hellwig wrote: > On Sat, Dec 08, 2018 at 12:47:30PM -0500, Jerome Glisse wrote: > > 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. > > get_user_pages is used by every single direct I/O, and while the race > windows in that case are small they very much exists. Yes and my proposal allow to fix that in even a better way than the pin count would ie allowing to provide a callback for write back to wait on direct I/O as you said for direct I/O it is a small window so it would be fine to have write back wait on it. Cheers, J?r?me