Received: by 2002:ac0:8c8e:0:0:0:0:0 with SMTP id r14csp965553ima; Wed, 6 Feb 2019 11:18:08 -0800 (PST) X-Google-Smtp-Source: AHgI3IbDS6DNrUaVDP/XfNS2vLGEeZQmt+NTsigWmfMd+axGz/u0J91uCO6t4BgDiQCJpoTCEQVd X-Received: by 2002:a63:2501:: with SMTP id l1mr10858734pgl.144.1549480688375; Wed, 06 Feb 2019 11:18:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549480688; cv=none; d=google.com; s=arc-20160816; b=RDHYUyp01rrqo2QKwilnCX1b5960NILKhWLKyXMlQBldIaZiJ+RqBt6xqdob9cmX6j QJ+Sv6pR04amaKtsqqBjYjTTHVcPSwP+zOHoGL2h4EOTza9FDbWNLPbl7nyv0a2PIl3O PHRyeryUs+Nl7HwnJbvDQNUdBknbXbeT1WLbhBtJDgkqSqd2pwvcMFjKn4hnNg1xhoNB Y2frKhLaiDfoji+ggF7exAEGmt/jmq4EFy8y5UmRrVQhENJ4fkVoT3pGQbJ/3DU9I/6Y Hr20AKPenaEja7wOzQ8aY08BnJe+d4EJ7pgn5Il6K0gn+L0YVY+ddkSQpGY2rFcsAlR0 nEIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=9isjYD3tDqSs6ntkDZQPz51nVFSZOituqfkcmLlMU/s=; b=XXzptQkO6m1WxuWn96rB9sexC+XxgZMLtmAzyZndYQrLucHDMAffb3D0M1AwY2ri8v TQiBYlE9Th+qGACve8oIrNfvM6jsEz2XUkTN0ZaXbNSmlPpTqpZ3zhPko3YkZ0N9U52j WLbR8UZXuQ6aFnVITIGjIsqQHcuQi/476ujSjhZpN6pnEUrPG9KIKv0YXoOCxtF1wwcO TZKck2d//Vqx6z5hAw73JjP7Mf4n7lTY1+Xm/EV1MTDvuV/EPBd5ayN3SDvqDLEEatWq AKuyBySWzqf5MW9FcdahmeDI6ybJWb9tsNe+hKHucM0g8vu0awRiuN2ifF8BVmT//Uh/ s3zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=VJLzZzDJ; 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 h11si2771201plr.175.2019.02.06.11.17.52; Wed, 06 Feb 2019 11:18:08 -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=pass header.i=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=VJLzZzDJ; 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 S1727078AbfBFTQY (ORCPT + 99 others); Wed, 6 Feb 2019 14:16:24 -0500 Received: from a9-35.smtp-out.amazonses.com ([54.240.9.35]:52356 "EHLO a9-35.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726832AbfBFTQW (ORCPT ); Wed, 6 Feb 2019 14:16:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1549480581; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type:Feedback-ID; bh=znIZuWNF4X3qMOcXoMBkQ62oatbaP8owCgJHWHXID7U=; b=VJLzZzDJARHqbWqB+oPbQUvfBw3ad4uMs5V9EZ6Sxrql4TaUUv54mEAg6vkqb2wp hJ+8gmBbIEEET+f2gIwCeApJpoU8ID418zMmx4PlsqnaxKp/hhvS5vfXcdC5L/9tWVT lH1yxIoaaol35eryN2nGrJnPhI272qHM6o7zat1A= Date: Wed, 6 Feb 2019 19:16:21 +0000 From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Doug Ledford cc: Matthew Wilcox , 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 In-Reply-To: <47820c4d696aee41225854071ec73373a273fd4a.camel@redhat.com> Message-ID: <01000168c43d594c-7979fcf8-b9c1-4bda-b29a-500efe001d66-000000@email.amazonses.com> 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> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SES-Outgoing: 2019.02.06-54.240.9.35 Feedback-ID: 1.us-east-1.fQZZZ0Xtj2+TD7V5apTT/NrT6QKuPgzCT/IC7XYgDKI=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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. 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. 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.