From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-05.nifty.com (conssluserg-05.nifty.com [210.131.2.90]) by sourceware.org (Postfix) with ESMTPS id 3E6B03858400 for ; Wed, 1 Sep 2021 00:17:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3E6B03858400 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-05.nifty.com with ESMTP id 1810Gk3i021934 for ; Wed, 1 Sep 2021 09:16:46 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com 1810Gk3i021934 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1630455406; bh=wigbU204agk1cDRvJlr2MoMs1oUYe3Q2+1OMbrJip5s=; h=Date:From:To:Subject:In-Reply-To:References:From; b=Ya6f9c0eIbaqzNof5XLri2Ur2iW9/1YzpahJ/hiI0Zylh7j2TFg/XmVTzZ5PDCCVg G151t28N/3kfr12k1LQBxXOg9Pk/n1iFomStHOazwaRALSR4cl06RTvCVJhzqjFL3/ DrKSKRMdYDikQ991tjocbX5yQVl7ceqf8szq3EqHIdI6s0+I7e9NkPolzoO7TEimZb UgHEnoVwC66uBGWPhlqbv8rlBAJbRZqrCSrciWRnDrOhRjT0XBA8WMEAigxqPZnmb5 wlFfGMbbQ1966jC2jM3jEgusgt8z0Cxt5z5TEmAHbNq2n+/oFaIZ1+daY2PZDBEj1Y rHDVZBEky40Qw== X-Nifty-SrcIP: [110.4.221.123] Date: Wed, 1 Sep 2021 09:16:52 +0900 From: Takashi Yano To: cygwin-developers@cygwin.com Subject: Re: cygrunsrv + sshd + rsync = 20 times too slow -- throttled? Message-Id: <20210901091652.6bf3cccbcaed4a22f6ffa6b0@nifty.ne.jp> In-Reply-To: <20210901080220.ee4a5bfbea62cc1ae0a9598e@nifty.ne.jp> References: <20210831175534.21edae2356d74a0750c686de@nifty.ne.jp> <20210831182500.4c1c67dae13f51ca68964f63@nifty.ne.jp> <20210831204541.2b56702cdcd2fae5e91ba8e2@nifty.ne.jp> <583ca127-02e7-6b3c-3732-6478c0f862e3@cornell.edu> <20210901080220.ee4a5bfbea62cc1ae0a9598e@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, 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 00:17:21 -0000 On Wed, 1 Sep 2021 08:02:20 +0900 Takashi Yano wrote: > On Tue, 31 Aug 2021 17:50:14 +0200 > Corinna Vinschen wrote: > > On Aug 31 17:27, Corinna Vinschen wrote: > > > On Aug 31 17:18, Corinna Vinschen wrote: > > > > 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. > > > > > > Oh, btw... why do you want to use WriteQuotaAvailable for normal > > > pipes, even though the read side information is available anyway? > > > > > > We can do that for fifos, no problem, but it doesn't make much sense > > > to differ between blocking and non-blocking pipes, the code flow is the > > > same. > > > > 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. -- Takashi Yano