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 A6C483858411 for ; Wed, 1 Sep 2021 13:52:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A6C483858411 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 (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N3bb3-1n2ZGB1L6Z-010Z1V for ; Wed, 01 Sep 2021 15:52:52 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id BDE6AA80D60; Wed, 1 Sep 2021 15:52:51 +0200 (CEST) Date: Wed, 1 Sep 2021 15:52:51 +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: <583ca127-02e7-6b3c-3732-6478c0f862e3@cornell.edu> <20210901080220.ee4a5bfbea62cc1ae0a9598e@nifty.ne.jp> <20210901091652.6bf3cccbcaed4a22f6ffa6b0@nifty.ne.jp> <20210901172339.1039604b7067e0492534a20f@nifty.ne.jp> <24138e20-aa97-cfea-bf48-198fc67755ea@cornell.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <24138e20-aa97-cfea-bf48-198fc67755ea@cornell.edu> X-Provags-ID: V03:K1:GhDPtDV74+VrEU+JkrqSIpq4/GBowJv7M6WF0roDlmDZHum0zEI T5CVpjSiaT+oe8Msmr9XzDRN+XqVnqo1iXJp+llpz0ycL5VrkRZuCpQ8dwW8ftpJEZM6geX ac5yJ/fMFwnA7TL0ceeDtfx8OUc5Uyd0dMklL2A2kdtas5xfXa8n3zQi8ZqUScgmv40htcG b8W8TYqzvh7WMAuJdofyg== X-UI-Out-Filterresults: notjunk:1;V03:K0:6jHEOhmVBhI=:B6IO02Gs/imjMz7Dsumq2B S78byGMzfeCtPIjuDe5u1v4QaWzKKQGFVMBxteAb8F9sNsWKrW+Abmt5+11qAN9MYn+ZqpWFj YrGElQJwD3fp1OCAa/srg6HTv/8IWnM9QNDPm5/ubV33x95ya1zfWreB2zRl5LXR3UUUobW2W f7RY/CM47kto89o4Dkt4xNv8IE38DpZxyDFflyfC1b6qvkTe7ImeOIjEU+6/+IU2X3suLzJ6Z rMd+F1DDQGGjsGjHH857gT0wYYiGbhOFiKvapHPyIKec1vlBA+CWy5l1e76TmCLsSNnD6x+c+ J4k/r5dTIqbsTahg4tgurisnhJZxNkFtk9SPs8oUi5ojgkeXjBu9fiU7KWa5whG8SmlKNrd9r +dds9dhGhcA2OSaz9JkC8Crv8tp2aWfG2t3efPUG3z7yAlU67B764goyMz9VJvl/bPr9lnp48 Qi7WxKsYdu0YWGD/SefckoYKUOMdcjYNivD9vF2Y6/Kh7jCCjNvbWy10CuuqZhrQEkYML4VlY 1Dx9kuAXp8U7F8X5CcRec58uwDK9uv04Hi2FaY1dxs5A2NlvLbHvSdSQN+M3PmUf17xjVp7vC plIfP50wNcUcYxYSDEbBoX6kwO6gD4WQd1p/eCPzMleY9qa1v6HpS8qOu03tMWuCgwttrkjYn ec/bybnpy0FvlpDuS3Enum7GT9peFfZSbJWYe01z3BvmApsa/YY6Zgu0sB3cVMJU7K3tXDXUu SKjg/z1ymLrb3SvoRZRxIOZrIAfT8nbyZ4X6mgmwfnDa+O+Z8CjPS0Cqq3o= X-Spam-Status: No, score=-99.8 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, JMQ_SPF_NEUTRAL, 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: Wed, 01 Sep 2021 13:52:55 -0000 On Sep 1 08:56, Ken Brown wrote: > On 9/1/2021 4:46 AM, Corinna Vinschen wrote: > > On Sep 1 17:23, Takashi Yano wrote: > > > On Wed, 1 Sep 2021 10:07:48 +0200 > > > Corinna Vinschen wrote: > > > > On Sep 1 09:16, Takashi Yano wrote: > > > > > On Wed, 1 Sep 2021 08:02:20 +0900 > > > > > Takashi Yano wrote: > > > > > > On Tue, 31 Aug 2021 17:50:14 +0200 > > > > > > Corinna Vinschen wrote: > > > > > > > So for the time being I suggest the below patch on top of topic/pipe. > > > > > > > It contains everything we discussed so far. > > > > > > > > > > > > One more thing. 'git log' cannot stop normally with 'q' with your patch. > > > > > > > > > > The same happes with 'yes |less'. > > > > > > > > > > The cause is that write side cannot detect closing read side because > > > > > query_hdl (read handle) is still opened. > > > > > > > > Oh > > > > > > > > my > > > > > > > > god. > > > > > > > > > > > > That kills the entire idea of keeping the read handle :( > > > > > > One idea is: > > > > > > Count read handle and write handle opned using NtQueryObject(). > > > If the numbers of opened handle are equal each other, only > > > the write side (pair of write handle and query_hdl) is alive. > > > In this case, write() returns error. > > > If read side is alive, number of read handles is greater than > > > number of write handles. > > > > Interesting idea. But where do you do the count? The event object > > will not get signalled, so WFMO will not return when performing a > > blocking write. > > What if we create an event that we signal every time a reader closes, and we > add that to the events that WFMO is waiting for? > > If this doesn't work for some reason, a different (but more complicated) > idea is to keep a count of the number of open readers in shared memory. > When this is 0, write returns an error. I'm thinking of shared memory as in > topic/af_unix (which I copied in the fifo implementation), but maybe > something simpler would work since we only have a single variable to keep > track of. Great idea that. What we need would be some semaphore upside down. One that can be used to count items and which is signalled if it's down to zero. Hmm, something to think about... Corinna