From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1A3AC43381 for ; Thu, 21 Feb 2019 14:29:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C19BA20665 for ; Thu, 21 Feb 2019 14:29:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="A8iqdBdI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728003AbfBUO3N (ORCPT ); Thu, 21 Feb 2019 09:29:13 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:36626 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726109AbfBUO3M (ORCPT ); Thu, 21 Feb 2019 09:29:12 -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=Mb5nB7wMoEhJ7wdw5jMQ+xXZOMJvJ50RJX0XtX1WZTc=; b=A8iqdBdIlQwWmga4mx+DBBtkv L77A1WH99QuDTgQW7f+l3zqAl7ZwtKPkWaOyziCT5zr8/N6yNg7lf0iZw0XM3T77hLXzzOZGuyUYL iXpCy1Ok+Z3AVDNozWh2NXoRcLp87b40U56ySBIfM7VgCik9HErnxXaN02KP48tPK7zTQ9bQZYHXz LX2BddhlhcPdaC381DB8YmbdLdeyRfri5xAkZuMV2OvyjFnnntYNT3hJuxhzbPnXMczxhem4+/In/ k5/Uyzu9V9FHEaZPSBetGLR2SM0LVTKgIysKQRH0cmixtd6gY5nt2IGCVLqHPhpua6D8o68nANlWn er9BSCw9A==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gwpLc-00072J-6B; Thu, 21 Feb 2019 14:29:12 +0000 Date: Thu, 21 Feb 2019 06:29:12 -0800 From: Matthew Wilcox To: Miklos Szeredi Cc: lsf-pc@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [LSF/MM TOPIC] reverse splice Message-ID: <20190221142912.GP12668@bombadil.infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org ... also, this really needs to be cc'd to linux-mm. On Thu, Feb 21, 2019 at 01:56:11PM +0100, Miklos Szeredi wrote: > rsplice would serve a similar purpose as splice, but in the other > direction. I.e. instead of operating on buffers filled with data, it > would operate on empty buffers to be filled with data. rsplice is to > splice as read is to write. > > data source -> splice -> data destination > data destination -> rsplice -> data source > > One use case would be zero-copy read in fuse. Zero-copy writes work > with plain splice: page cache pages or userspace buffers are passed > through to the userspace filesystem server as pipe buffers and they > can be directed wherever the filesystem wants. The reverse doesn't > work. There's code to attempt stealing pages and inserting into the > fuse page cache, but this is far from being as generic as the write > path. > > What do people think? Is this crazy? Are there major roadblocks for > implementation? Would this have any other use cases? > > To me it looks like this is pretty symmetrical with normal splice, the > big difference being that uninitialized buffers would be passed > around. Obviously must make sure those buffers are write only, i.e. > the previous contents are inaccessible. > > Thanks, > Miklos