This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [PATCH fifo 0/2] Add support for duplex FIFOs
- From: Ken Brown <kbrown at cornell dot edu>
- To: "cygwin-patches at cygwin dot com" <cygwin-patches at cygwin dot com>
- Date: Wed, 3 Apr 2019 12:39:34 +0000
- Subject: Re: [PATCH fifo 0/2] Add support for duplex FIFOs
- References: <20190325230556.2219-1-kbrown@cornell.edu> <20190326083620.GI3471@calimero.vinschen.de> <1fc7ff06-38cf-6c89-03f4-e741f871b936@cornell.edu> <20190326190136.GC4096@calimero.vinschen.de> <20190327133059.GG4096@calimero.vinschen.de> <87k1gi3mle.fsf@Rainer.invalid> <20190328201317.GZ4096@calimero.vinschen.de> <d4cb62f1-5754-aff2-c23d-7ce65f5a5726@cornell.edu> <87o95u5eu0.fsf@Rainer.invalid> <f8b66caf-7673-f92b-ed2e-127b387f1f09@cornell.edu> <87tvfljvaa.fsf@Rainer.invalid> <87a7h7mfo8.fsf@Rainer.invalid>
On 4/3/2019 8:33 AM, Achim Gratz wrote:
> Achim Gratz writes:
>> OK, a bit more info: The whole thing runs from a perl script (actually a
>> module) that opens pipes to gnuplot and ghostscript. This code is
>> _really_ old and has seen a lot of Cygwin releases, so it has options to
>> either use temporary files, named pipes aka FIFO or direct pipes. Using
>> temporary files serializes the execution and using a pipe chain is
>> _really_ slow (like a hundred times, which is mostly tied up in system
>> for a reason that I don't understand), so using FIFO is the default.
>> Your new FIFO code increases the system time by about a factor of 10 in
>> my tests, btw.
>
> So I've finalöly got around to fixing the pipe performance problem by
> fooling the programs involved to think they are using files: have them
> reading from /proc/self/fd/0 and writing to /proc/self/fd/1 gives me the
> same performance as using a named FIFO.
>
> Incidentally, that workaround still works when I switch to the 20190402
> snapshot, while named FIFO fails as with the older snapshot (as
> expected), so that seems to take a different code path. Maybe that
> helps in finding the problem?
Thanks.
In the meantime, I've fixed the raw_write bug that I mentioned in an earlier
post, along with some other bugs I found. I want to do a little more testing
before I send the patches.
Ken