From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) by sourceware.org (Postfix) with ESMTPS id 49EC23858409 for ; Tue, 31 Aug 2021 15:18:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 49EC23858409 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=cygwin.com Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MScox-1mRv9841dJ-00Svmd for ; Tue, 31 Aug 2021 17:18:36 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 65472A80D9A; Tue, 31 Aug 2021 17:18:35 +0200 (CEST) Date: Tue, 31 Aug 2021 17:18:35 +0200 From: Corinna Vinschen To: cygwin-developers@cygwin.com Subject: Re: cygrunsrv + sshd + rsync = 20 times too slow -- throttled? Message-ID: Reply-To: cygwin-developers@cygwin.com Mail-Followup-To: cygwin-developers@cygwin.com References: <20210831175534.21edae2356d74a0750c686de@nifty.ne.jp> <20210831182500.4c1c67dae13f51ca68964f63@nifty.ne.jp> <20210831204541.2b56702cdcd2fae5e91ba8e2@nifty.ne.jp> <583ca127-02e7-6b3c-3732-6478c0f862e3@cornell.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <583ca127-02e7-6b3c-3732-6478c0f862e3@cornell.edu> X-Provags-ID: V03:K1:+uaZ2lmJpvm85MIWRv55RNlaBGkgti/hsh+1P5CdAwBM0Vjm3SY iTUPZCX7Ro2DuFP4HH5VCdD/mAt97CZJZV1t1zh4he+jgxx+BiEaqNVI5bSyNfX23KPZC6h mjrGbQQ/y0wMJN5EjE93bojTU22ohCBLyhmgSLNSdYsPHhOizIyqFXhcBZ7jo/v7LufaT+Q zqQhtxORH35P3TznsY6MA== X-UI-Out-Filterresults: notjunk:1;V03:K0:e339adyMeOc=:Xs8rAmuwavrFRTg1hR7ehh HjU1Ioz6IsP+xuOYkayGj36/D7J7W+EqD7CRw+opGChKIwbTESUd+7NHlKvHVW/TVdiYkZAdC UoOQcWEn8yHmIjjquMckpuT8y8Z3Bav3o7YNUXqXJwxIRlIXSCsQxYuLxSwrE5W9BLk9tJ/Co yp4w8q3HAvil9ljaaC9chGQpPkyfRRjZ6fDoF3DZ6RNkY+wo/7678+Rk82Cy91WcoxPES5DDm dC9wVKPKSdM63TD1NUKloFEdR1LRPS+F0ssZuJLJWZajfUj+rLX8NSefHRm6v69ntwB2aXN08 jK9pI8yGKCOaejuOopm+f1Y1Bi49gQOsjfIQds6NbvDMUBjyFzpnUNu/s0jNSssmg5RzruL2+ staaGJtjvQRpXuJ4iyOrjHDCfSUiz4eBrpLEQJ5VXgXJ4WWaakMHcGgxKAeI2RxkDasB30EqK EeRgnK4yVfoByYVU0QfanqE4ZhMzuhUQR24Eh3+XJUn9mI7OTn9qhCoJ8VaQyHRpv2P9yy8/s lNpP9m3xDh2qGeFB7iRR/F6Yiyjgkmc2XKamiQKXkQ94GrXC1lUXg7YUsaNB+yPaSmKyncfPN ZDa77CEDuWv2JFfDWBuw3iT+4+Kq6lc2WqcWtkn6jiFxBQ4teyn1KP9MMfN7xxzi7C5wzg2Uo VU0aqW8zQW59rmmV8AmLpKASZdTqU1GF0nf63Mtn1/lhGAlhKOxkqH6Me3gJEPVaP2iSuXGMq 47uAjPaXEzVMTeidF2kaCtSgSrEXaCjNw/69vlSU3+xgxogA076hTWZinWI= X-Spam-Status: No, score=-100.1 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin-developers@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component developers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 15:18:38 -0000 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