Return-Path: Received: from bombadil.infradead.org ([198.137.202.133]:42856 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751348AbeCNLpU (ORCPT ); Wed, 14 Mar 2018 07:45:20 -0400 Date: Wed, 14 Mar 2018 04:45:18 -0700 From: Matthew Wilcox To: Miklos Szeredi Cc: Boaz Harrosh , linux-fsdevel , Ric Wheeler , Steve French , Steven Whitehouse , Jefff moyer , Sage Weil , Jan Kara , Amir Goldstein , Andy Rudof , Anna Schumaker , Amit Golander , Sagi Manole , Shachar Sharon Subject: Re: [RFC 1/7] mm: Add new vma flag VM_LOCAL_CPU Message-ID: <20180314114518.GC29631@bombadil.infradead.org> References: <443fea57-f165-6bed-8c8a-0a32f72b9cd2@netapp.com> <20180313185658.GB21538@bombadil.infradead.org> <20180314111750.GA29631@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Mar 14, 2018 at 12:31:22PM +0100, Miklos Szeredi wrote: > On Wed, Mar 14, 2018 at 12:17 PM, Matthew Wilcox wrote: > >> And we already have an interface for this: splice(2). What am I > >> missing? What's the killer argument in favor of the above messing > >> with tlb caches etc, instead of just letting the kernel do the dirty > >> work. > > > > Great question. You're completely right that the question is how to tell > > the kernel what to copy. The problem is that splice() can only write to > > the first page of a pipe. So you need one pipe per outstanding request, > > which can easily turn into thousands of file descriptors. If we enhanced > > splice() so it could write to any page in a pipe, then I think splice() > > would be the perfect interface. > > Don't know your usecase, but afaict zufs will have one queue per cpu. > Having one pipe/cpu doesn't sound too bad. Erm ... there's nothing wrong with having one pipe per CPU. But pipes being non-seekable means that ZUFS can only handle synchronous I/Os. If you want to have a network backend, then you'd only be able to have one outstanding network request per pipe, which is really going to suck for bandwidth. > But yeah, there's plenty of room for improvement in the splice > interface. Just needs a killer app like this :) I'm happy to start investigating making pipes random-access ...