cygrunsrv + sshd + rsync = 20 times too slow -- throttled?

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Aug 31 15:18:35 GMT 2021


On Aug 31 08:33, Ken Brown wrote:
> On 8/31/2021 7:45 AM, Takashi Yano wrote:
> > On Tue, 31 Aug 2021 12:18:57 +0200
> > Corinna Vinschen wrote:
> > > Please try the attached patch on top of topic/pipe.
> > 
> > Thanks for the new patch. I have confirmed that above issue
> > is fixed and select() for write pipe seems to work as expected.
> > 
> > 
> > BTW, I found one minor difference between Linux and this pipe
> > implementation.
> > [...]
> > Is this difficult to be fixed?
> Two other remarks:
> 
> 1. I think query_hdl needs to be initialized in the fhandler_pipe constructor.

No, that's not necessary.  The fhandlers are always ccalloc'ed so they
are all 0 anyway.

> 2. When the read side of the pipe is non-blocking, there can be no pending
> reads, so shouldn't we be able to use WriteQuotaAvailable reliably on the
> write side?  (I can't test this at the moment.)

In theory, yes, but is it a safe bet that non-blocking reads won't change
WriteQuotaAvailable on the write side, at least for a very short time?
The question is, of course, if that really makes much of a difference.

> This applies in particular
> to the call to pipe_data_available at the end of peek_fifo, since all fifo
> readers use non-blocking pipes.  Maybe pipe_data-available needs an extra
> parameter so the caller can specify that WriteQuotaAvailable should be used.

I can fix up my patch to accommodate that.


Corinna


More information about the Cygwin-developers mailing list