From owner-freebsd-arch@FreeBSD.ORG Tue Jan 17 11:43:20 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8AC0106567B; Tue, 17 Jan 2012 11:43:20 +0000 (UTC) (envelope-from giovanni.trematerra@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0E02D8FC1B; Tue, 17 Jan 2012 11:43:19 +0000 (UTC) Received: by qaea17 with SMTP id a17so359932qae.13 for ; Tue, 17 Jan 2012 03:43:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=KTYTXnYsmDMHMtnhPZRu/mDR7RjC8FQ3hqAHQijSvBQ=; b=SxhH4mgLeaykc5mI29TBbe3ooWb4dUOAI+OBmBGvm/63BjIzpmyuxADwESqsaSGsNc 9sW3Oa7e/uqnvzuC4I2PQ10t0sN4GMPouO3nIlLi4VC7KVK6tSrciVlAbkGHq5oserNv vDRWCDGXYHGFMK2fO/m1nXYP0duVDHRI5bt4Q= MIME-Version: 1.0 Received: by 10.224.175.2 with SMTP id v2mr19222577qaz.69.1326800599198; Tue, 17 Jan 2012 03:43:19 -0800 (PST) Sender: giovanni.trematerra@gmail.com Received: by 10.229.237.130 with HTTP; Tue, 17 Jan 2012 03:43:19 -0800 (PST) In-Reply-To: <20120110153807.H943@besplex.bde.org> References: <20120110005155.S2378@besplex.bde.org> <20120110153807.H943@besplex.bde.org> Date: Tue, 17 Jan 2012 12:43:19 +0100 X-Google-Sender-Auth: 645caFxRq1bqn0vB0s802y97i4M Message-ID: From: Giovanni Trematerra To: Bruce Evans Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: jilles@freebsd.org, Attilio Rao , flo@freebsd.org, Konstantin Belousov , freebsd-arch@freebsd.org Subject: Re: pipe/fifo code merged. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2012 11:43:20 -0000 On Tue, Jan 10, 2012 at 10:41 AM, Bruce Evans wrote: > On Mon, 9 Jan 2012, Giovanni Trematerra wrote: > >> On Mon, Jan 9, 2012 at 3:34 PM, Bruce Evans wrote= : >>> >>> >>> I would go the other way, and pessimize pipes to be like fifos. =A0Then >>> optimize the socket layer under both. =A0Fifos are not important, but >>> they are implemented on top of the socket layer which is important. >>> Pipes are important. ... >>> ... >>> >>> Linux-2.6.10 implements fifos as a small wrapper around pipes, while >>> FreeBSD implements them as a large wrapper around sockets. =A0I hope th= e >>> former is what you do -- share most pipe code, without making it more >>> complicated, and with making the fifo wrapper much simpler. =A0The Linu= x >>> code is much simpler and smaller, since for pipes it it doesn't >>> implement direct mode, and for sockets it doesn't have to interact with >>> the complicated socket layer. >> >> >> If you read the patch, as I think you didn't, you'd see that there's no >> wrapper >> at all. fifo's code is just fifo_open, fifo_close and another couple of >> helper >> functions to deal with VFS, all the remaining code is shared with pipes >> and >> no complicated code was added. > > > I think you don't want me to read the patch, since I would see too much > detail starting with style bugs. =A0Anyway.. Did you agree that this patch http://www.trematerra.net/patches/pipefifo_merge2.4.diff doesn't introduce any further regressions while it fixes - style bugs you pointed out. - pipe_stat now use underlying filesystem information for pipes. - comment about pipeinfo was intended for. - race into pipe_poll (look at fifo_iseof line). I want to work on the other problems you outlined in order to get all the regression test passing, more posix compliance and so on but on a separate patchset. Thank you -- Gianni