Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1536232imj; Fri, 8 Feb 2019 03:11:35 -0800 (PST) X-Google-Smtp-Source: AHgI3IY5Hoy/rRkJZBpkDrUS7UKctrF401bnICBLndjMGQy+eKFrveCSfrWFf0Q7dPtDl8K75wME X-Received: by 2002:a17:902:b20e:: with SMTP id t14mr22308445plr.128.1549624295562; Fri, 08 Feb 2019 03:11:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549624295; cv=none; d=google.com; s=arc-20160816; b=eVrHvr/xin8m4cCCBicgnBTgJd6N4nIq9wSXWPBMj+jSQnC5B5gywCuvwuK2unw+9m xe63XgbmUgNCB8Vh2+YyaO4gVkSpMinRPlVDEfAvih6Eu/a7iM5Y+CCtFBkozcu9M4x6 efLyAyLR5DQ6jiGadp6PY/NyBimE04YJpKHJldxjg17C28BRuZhtxjoVEENTT+hk7aFV bEbU1mBcEKF82j/NDbXaeGw2Yq7BID48xUf+l0TcE+u+NwdjVkoP0EVK5biwu9dwzUrE XAmeVK73Ck8P0lyRbbExENWG7H8N+xXfu7Hs//fweTiGhvRU4kT5+Wum+l26ncX8Gwtp H+Dg== 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=/jy4VguCfapXyCYW0zVi/XiLIVpk/VCsqtWDzl2/J6k=; b=dy+4qpUGfEGBf1r06t06P+aJTG4MkO/Ympgjk4cxewALk+v4xECTNF0AO2pYUmsEmx fqUTEJqCM6XK6PTAtwlz8uFOMC3S+p9zar03PrmumKWac8pdRzct92qp3/73gTzlJgdo 97V1/nVCcIAmtSJjGRJE2I46YZEm0GfhNAZCPgVByasL5xuOsxUopo/dEDNUUXpkvLWP hR9zUUsClzyloL0Ivlce8BrZ0TFTMRwXSKAeXiP7XmHaDs7jgZuO8PP//7a34iDRxQz2 n6oVUxZNZOpvTruU/30A8tppKOh72TtfZgPZ2e0NHvw93XK+39Rg0S1e7sjNxmjAHsUI npdw== 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 e6si1890491pgp.504.2019.02.08.03.11.18; Fri, 08 Feb 2019 03:11:35 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727849AbfBHLKb (ORCPT + 99 others); Fri, 8 Feb 2019 06:10:31 -0500 Received: from mx2.suse.de ([195.135.220.15]:33500 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726547AbfBHLKb (ORCPT ); Fri, 8 Feb 2019 06:10:31 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id BF4C5AE65; Fri, 8 Feb 2019 11:10:29 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id C875D1E3DB8; Fri, 8 Feb 2019 12:10:28 +0100 (CET) Date: Fri, 8 Feb 2019 12:10:28 +0100 From: Jan Kara To: Dave Chinner Cc: Christopher Lameter , Doug Ledford , Dan Williams , Jason Gunthorpe , Matthew Wilcox , Jan Kara , Ira Weiny , lsf-pc@lists.linux-foundation.org, linux-rdma , Linux MM , Linux Kernel Mailing List , John Hubbard , Jerome Glisse , Michal Hocko Subject: Re: [LSF/MM TOPIC] Discuss least bad options for resolving longterm-GUP usage by RDMA Message-ID: <20190208111028.GD6353@quack2.suse.cz> References: <20190206175233.GN21860@bombadil.infradead.org> <47820c4d696aee41225854071ec73373a273fd4a.camel@redhat.com> <01000168c43d594c-7979fcf8-b9c1-4bda-b29a-500efe001d66-000000@email.amazonses.com> <20190206210356.GZ6173@dastard> <20190206220828.GJ12227@ziepe.ca> <0c868bc615a60c44d618fb0183fcbe0c418c7c83.camel@redhat.com> <01000168c8e2de6b-9ab820ed-38ad-469c-b210-60fcff8ea81c-000000@email.amazonses.com> <20190208044302.GA20493@dastard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190208044302.GA20493@dastard> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 08-02-19 15:43:02, Dave Chinner wrote: > On Thu, Feb 07, 2019 at 04:55:37PM +0000, Christopher Lameter wrote: > > One approach that may be a clean way to solve this: > > 3. Filesystems that allow bypass of the page cache (like XFS / DAX) will > > provide the virtual mapping when the PIN is done and DO NO OPERATIONS > > on the longterm pinned range until the long term pin is removed. > > So, ummm, how do we do block allocation then, which is done on > demand during writes? > > IOWs, this requires the application to set up the file in the > correct state for the filesystem to lock it down so somebody else > can write to it. That means the file can't be sparse, it can't be > preallocated (i.e. can't contain unwritten extents), it must have zeroes > written to it's full size before being shared because otherwise it > exposes stale data to the remote client (secure sites are going to > love that!), they can't be extended, etc. > > IOWs, once the file is prepped and leased out for RDMA, it becomes > an immutable for the purposes of local access. > > Which, essentially we can already do. Prep the file, map it > read/write, mark it immutable, then pin it via the longterm gup > interface which can do the necessary checks. Hum, and what will you do if the immutable file that is target for RDMA will be a source of reflink? That seems to be currently allowed for immutable files but RDMA store would be effectively corrupting the data of the target inode. But we could treat it similarly as swapfiles - those also have to deal with writes to blocks beyond filesystem control. In fact the similarity seems to be quite large there. What do you think? Honza -- Jan Kara SUSE Labs, CR