From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-03.nifty.com (conssluserg-03.nifty.com [210.131.2.82]) by sourceware.org (Postfix) with ESMTPS id 9C2F23857C5B for ; Wed, 1 Sep 2021 08:23:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9C2F23857C5B Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=nifty.ne.jp Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp Received: from Express5800-S70 (z221123.dynamic.ppp.asahi-net.or.jp [110.4.221.123]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 1818NdmB018146 for ; Wed, 1 Sep 2021 17:23:40 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 1818NdmB018146 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1630484620; bh=q554VFgDajCwqNfM3pNisX0bERllX7dBOYLU3NZV4is=; h=Date:From:To:Subject:In-Reply-To:References:From; b=i0swpg5ST9kns5a0EhgzO4PF59aKmxHjKJP77U1QGHzkhHIXmVtH/BbFQzel2aizp 28iefxWCY9765vdlykTWR7oWmz07BhrDQ90ch4D0j6ZxFPfwbZi/CAJ8YVLv+0ENGF D5hwfRiIncaUcwo1J/W56Yg3tTi3RYo3fR4kmIRAAeW3MUra3hT5mbYZ/WH9DPUEd8 tsEjoCExkcLgLSrMsHLmMqfAmACuHbawfDHDVhwWkkFOlD2AJ2EIQAQeTYfaT51kks TpHhxJmPphNoUtaMQ+rj0C0O8cqdAoABqgU4Ely0utU1UbYlIhXiYgrDdf31wBW74P UDwmZoZjCI83g== X-Nifty-SrcIP: [110.4.221.123] Date: Wed, 1 Sep 2021 17:23:39 +0900 From: Takashi Yano To: cygwin-developers@cygwin.com Subject: Re: cygrunsrv + sshd + rsync = 20 times too slow -- throttled? Message-Id: <20210901172339.1039604b7067e0492534a20f@nifty.ne.jp> In-Reply-To: References: <20210831182500.4c1c67dae13f51ca68964f63@nifty.ne.jp> <20210831204541.2b56702cdcd2fae5e91ba8e2@nifty.ne.jp> <583ca127-02e7-6b3c-3732-6478c0f862e3@cornell.edu> <20210901080220.ee4a5bfbea62cc1ae0a9598e@nifty.ne.jp> <20210901091652.6bf3cccbcaed4a22f6ffa6b0@nifty.ne.jp> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, 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 08:24:09 -0000 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. But atomicity should be considered. -- Takashi Yano