Received: by 2002:ac0:8c8e:0:0:0:0:0 with SMTP id r14csp987111ima; Wed, 6 Feb 2019 11:41:34 -0800 (PST) X-Google-Smtp-Source: AHgI3IbrknV1lFVsQt2Be5eOngb0qsbiCcjsawgQ7qSIj1Ha6AIrIesegVwuC2swy11TD3E8uyKq X-Received: by 2002:a63:200e:: with SMTP id g14mr11193909pgg.235.1549482094882; Wed, 06 Feb 2019 11:41:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549482094; cv=none; d=google.com; s=arc-20160816; b=oMR9vdjRTAauzGx6M2h9vh7eHhKgxWt2atgmqWL8tVQoB3hS/wfOGFhyWbhL3O3+CQ aL3PmsvOBxFg+mlPlyRpBYzFjNZz9SvrQ5Ksjt6GTDy1W8FOLHSwutlXwPVzmtsxn23V 2jx8cGR3EsGmLOqrw7FbjaWIQXCPP/zvWh4gpN1Q73760G4Gi5ZGsXeVMo39xinYyBc8 lL0xgelE5EEcnuvgRAWtD3rL1x+j60ZKUYTmdoNm+TjHjZVeRgn8aJHGkNVkfxcEHsh6 7KOidezL7/Ly0O2v1sJj4VtkZfDcWFiGBiMl5qOhn1Rm7pxkc1TiJWj+FBwM7vHp6Ndh IWZA== 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:dkim-signature; bh=BA5++3mOup44EpHAKD9LlVzSGzF+bJ0yAEAwHsLicYk=; b=kCq7zEhpoAFPtwqPs2zh87ugtuLQ8XwWOv1ZkGTEYsK9GSNoR0552ajDLHMa+p1Mjp pGMcXpqWCiGC2fRmWQhRpdzo2dVR6ePwkzOVxPP2JqOizyZXTQXZiKy1XUEeXxttV9hM IyFWp+LBsQ3dZ84EAoHfl1vAZ5Ss2IRMII6wh3sn0UQ3aYgiHGTkmYW02x2zhyCMHrqh 76T8NpHYZ5aZexi1QlBPK0SkfIq4RXs4PRS1c1o/p02287bcmh3D/EgCF63BA0T5Cxt/ mn6G1owT9Q4ujdAzmLotyaQk8E8ne2Fb2j6pcFx68eZvvHUcQ2BFiNt5WinK42FuOlE0 ssvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@infradead.org header.s=bombadil.20170209 header.b=SSgOnHpa; 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 l22si6833200pfg.275.2019.02.06.11.41.18; Wed, 06 Feb 2019 11:41:34 -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; dkim=neutral (body hash did not verify) header.i=@infradead.org header.s=bombadil.20170209 header.b=SSgOnHpa; 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 S1726614AbfBFTlA (ORCPT + 99 others); Wed, 6 Feb 2019 14:41:00 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:53928 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbfBFTlA (ORCPT ); Wed, 6 Feb 2019 14:41:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=KUo1sm11EKAgA+q/x8aFzMhJrSzJBKbg0a/gSVG3nvA=; b=SSgOnHpaimS7ENQea9aMmvnmb UZpIO2AVsJQrc6Zftn+jEQn05/bgZWzoCwOKTQmsz8XsUL8gLr/ORIVAODYwuXTyiMsFLdDMDgUpG YNZFWk5DvJE1cg8HylhWjkqmP+fLVZkWfycf5r9bMnGXBjhflXjVKfLLgfWgtrxRW1SnE75hYEsQO rd6cuZmM1GzWZuRw7ZNPFGs3ZlraxiLL6bDjB414cV2JRDIK20468VPWjGrZ5I/42jJnDc/Zo3R7D FcT+Vr29YYYvugS+Sa9QPCwOjCGKoKLF9BSOfJBtCouJXTlizucuv2Fv/XoLy3SMz1X6jum3yXWLh 6IwRD+ziw==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1grT43-00032j-M5; Wed, 06 Feb 2019 19:40:55 +0000 Date: Wed, 6 Feb 2019 11:40:55 -0800 From: Matthew Wilcox To: Christopher Lameter Cc: Doug Ledford , Jason Gunthorpe , Jan Kara , Ira Weiny , lsf-pc@lists.linux-foundation.org, linux-rdma@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, John Hubbard , Jerome Glisse , Dan Williams , Dave Chinner , Michal Hocko Subject: Re: [LSF/MM TOPIC] Discuss least bad options for resolving longterm-GUP usage by RDMA Message-ID: <20190206194055.GP21860@bombadil.infradead.org> References: <20190205175059.GB21617@iweiny-DESK2.sc.intel.com> <20190206095000.GA12006@quack2.suse.cz> <20190206173114.GB12227@ziepe.ca> <20190206175233.GN21860@bombadil.infradead.org> <47820c4d696aee41225854071ec73373a273fd4a.camel@redhat.com> <01000168c43d594c-7979fcf8-b9c1-4bda-b29a-500efe001d66-000000@email.amazonses.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01000168c43d594c-7979fcf8-b9c1-4bda-b29a-500efe001d66-000000@email.amazonses.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 06, 2019 at 07:16:21PM +0000, Christopher Lameter wrote: > On Wed, 6 Feb 2019, Doug Ledford wrote: > > > Most of the cases we want revoke for are things like truncate(). > > > Shouldn't happen with a sane system, but we're trying to avoid users > > > doing awful things like being able to DMA to pages that are now part of > > > a different file. > > > > Why is the solution revoke then? Is there something besides truncate > > that we have to worry about? I ask because EBUSY is not currently > > listed as a return value of truncate, so extending the API to include > > EBUSY to mean "this file has pinned pages that can not be freed" is not > > (or should not be) totally out of the question. > > > > Admittedly, I'm coming in late to this conversation, but did I miss the > > portion where that alternative was ruled out? > > Coming in late here too but isnt the only DAX case that we are concerned > about where there was an mmap with the O_DAX option to do direct write There is no O_DAX option. There's mount -o dax, but there's nothing that a program does to say "Use DAX". > though? If we only allow this use case then we may not have to worry about > long term GUP because DAX mapped files will stay in the physical location > regardless. ... except for truncate. And now that I think about it, there was a desire to support hot-unplug which also needed revoke. > Maybe we can solve the long term GUP problem through the requirement that > user space acquires some sort of means to pin the pages? In the DAX case > this is given by the filesystem and the hardware will basically take care > of writeback. It's not given by the filesystem. > In case of anonymous memory this can be guaranteed otherwise and is less > critical since these pages are not part of the pagecache and are not > subject to writeback. but are subject to being swapped out?