pipe/fifo code merged.

Giovanni Trematerra gianni at freebsd.org
Tue Jan 17 11:43:20 UTC 2012


On Tue, Jan 10, 2012 at 10:41 AM, Bruce Evans <brde at optusnet.com.au> wrote:
> On Mon, 9 Jan 2012, Giovanni Trematerra wrote:
>
>> On Mon, Jan 9, 2012 at 3:34 PM, Bruce Evans <brde at optusnet.com.au> wrote:
>>>
>>>
>>> I would go the other way, and pessimize pipes to be like fifos.  Then
>>> optimize the socket layer under both.  Fifos 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.  I hope the
>>> former is what you do -- share most pipe code, without making it more
>>> complicated, and with making the fifo wrapper much simpler.  The Linux
>>> 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.  Anyway..

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


More information about the freebsd-arch mailing list