From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamie Lokier Subject: Re: idea: user to user pipe copy Date: Fri, 23 Apr 2004 15:29:37 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20040423142937.GA6300@mail.shareable.org> References: <40884D88.90408@borgerding.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from mail.shareable.org ([81.29.64.88]:28070 "EHLO mail.shareable.org") by vger.kernel.org with ESMTP id S264827AbUDWO3k (ORCPT ); Fri, 23 Apr 2004 10:29:40 -0400 To: Mark Borgerding Content-Disposition: inline In-Reply-To: <40884D88.90408@borgerding.net> List-Id: linux-fsdevel.vger.kernel.org Mark Borgerding wrote: > Why not keep track of blocked read()s on a pipe fd? > > When the writer writes something to the pipe, data could be copied > directly from one user process to another, rather than > calling copy_from_user then copy_to_user. > > This alleged speed increase would benefit all blocking pipes & fifos, > roughly half the time (i.e. whenever the read happens before the write). You only get page faults from one of the mm contexts, so copy_from_user_to_other_user would have to do explicit page table operations to find the pages of the other mm. There may also be a little data cache flushing required with SMP. It seems feasible. -- Jamie