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 8B909C43381 for ; Thu, 21 Feb 2019 14:28:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C4AD20838 for ; Thu, 21 Feb 2019 14:28:45 +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="kmOnE3+b" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725385AbfBUO2o (ORCPT ); Thu, 21 Feb 2019 09:28:44 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:36586 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727771AbfBUO2n (ORCPT ); Thu, 21 Feb 2019 09:28:43 -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=kx02ZZv2nlK835OykYn/dhF2SvjQMRFZV5jUI8+1n/M=; b=kmOnE3+bJ0mLrLtzi8nYKppi/ 0+aIRl3QjDVMPcpHAgx1pAheU2K6/TdXRxwTJudxVihh6YfY51MeHYVJdPeDPn7dccpvXcxJ811yc Ovz0TYyzr8CyTM1GIWadAfCRrceOqE58nli2rRbTxg4aVuY0Z/sJDDc4uPR34S8sIlqQnVynv5Sv9 QzZimhNPrlcxOx5JIYWbdU4M8YUvhkpFYyo9zlIpng02oXU9/eg3Avo0l6tYc2K24FZU1YsfLgi3p 9WSUQrC6jGKwFra7jFP6EnOC9ZWNnKOEqwuHa69ARBT4WOy78WypT9txLtEdNbA0tq9qov6fibm0S SSHgNBMig==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gwpL8-0006yg-Py; Thu, 21 Feb 2019 14:28:42 +0000 Date: Thu, 21 Feb 2019 06:28:42 -0800 From: Matthew Wilcox To: Miklos Szeredi Cc: lsf-pc@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org Subject: Re: [LSF/MM TOPIC] reverse splice Message-ID: <20190221142842.GO12668@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 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? This was something I was interested in last year for a project at my then-employer. It's not something I'm interested in right now, but I could imagine it becoming interesting to me again fairly rapidly. It's one of those projects I have to think very hard about and I don't have the spare cycles to do that today. So I think it should be done, but I should probably stay focused on my other projects right now.