From: Mark Borgerding Subject: idea: user to user pipe copy Date: Thu, 22 Apr 2004 18:56:08 -0400 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <40884D88.90408@borgerding.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from ms-smtp-01-smtplb.ohiordc.rr.com ([65.24.5.135]:12163 "EHLO ms-smtp-01-eri0.ohiordc.rr.com") by vger.kernel.org with ESMTP id S261996AbUDVW4L (ORCPT ); Thu, 22 Apr 2004 18:56:11 -0400 Received: from borgerding.net (cvg-65-27-241-239.cinci.rr.com [65.27.241.239]) by ms-smtp-01-eri0.ohiordc.rr.com (8.12.10/8.12.7) with SMTP id i3MMu9UK003982 for ; Thu, 22 Apr 2004 18:56:09 -0400 (EDT) To: linux-fsdevel@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Would someone tell me why this a) won't work? b) shouldn't be done? c) is the dumbest idea since Microsoft Bob? Currently, piped data gets copied from user space to a kernel buffer then back out to user space. This happens regardless of whether there is already a reader who is blocked on that fd. Instead ... 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). -- Mark Borgerding