This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Re: Fifo blocking and performance issues


On 10/2/2012 1:19 PM, Christopher Faylor wrote:
On Tue, Oct 02, 2012 at 03:15:37PM -0400, bob wrote:
Any suggestions on how we can achieve a higher performance blocking read on a
Cygwin RDWR fifo?

As always, if you can provide test cases of bugs we will endeavor to fix problems.

I didn't think the RDWR fifo's worked at all -- they certainly don't if you create them via bash.


I have a patch for this but there are some problems with it.

I've enclosed the work-in-progress patch, feel free to give it a try and see if that changes anything (you'll need to rebuild your cygwin1.dll from cvs, the instructions are in the cygwin FAQ).

If people have any ideas on how to improve on what I did here I'd love to hear from them. My current thinking is that to really fix cygwin fifo's we need to divorce cygwin's fifo handles from the win32 named pipe handles used to implement them.

No promises that I ever actually get around to doing this -- but to /really/ fix cygwin named pipes, I'm leaning towards the following approach:

 o create a fhandler_pipe_base class that implements pipes using
   MailSlots instead of win32 named pipes; it should be a
   descendant of fhandler_overlapped_base so that we have enough
   freedom to implement the correct blocking semantics

 o make fhandler_pipe and fhandler_fifo into trivial superclasses
   of fhandler_pipe_base; they should only need to override
   ::open and, I think, only need to override the naming
   convention applied to the MailSlot objects.

But the above is bikeshedding based on what I learned mucking around with the existing implementation. It's a decent amount of work to actually implement that plan.

-gmt

Attachment: cygwin-1.7.pre17-duplex-fifo-support.patch
Description: Text document

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]