From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-02.nifty.com (conssluserg-02.nifty.com [210.131.2.81]) by sourceware.org (Postfix) with ESMTPS id 0D89A3858D3C for ; Mon, 20 Sep 2021 21:27:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0D89A3858D3C 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-02.nifty.com with ESMTP id 18KLRUFc008818 for ; Tue, 21 Sep 2021 06:27:30 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com 18KLRUFc008818 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1632173250; bh=J2/G2yuSYrpwcUvvS20WsR3lJVgB3tEtUOtm4avmTiI=; h=Date:From:To:Subject:In-Reply-To:References:From; b=lOfaI1TEdkR2GRoK8dj9lJOqyshUxK0FfXKh3wlyxtX7CQQQ+CQCUwzPYIGtqAt2Q 5cKqTYhELzd1G1SFEvCGZoxW9XZ835jcyhGNK9SawPG9rOYin9GZ9B6kWi8fOxmypS SAPZeeiBknYXY5wpv7DtOuy7lc66nYhgWujNskJpLBBqgRBywB/99d51O0xL84/oVC TAdmNqF0xqrT86Yf5SFtDsx5EvsqEDB7ePNp7EbEeGqAOrGyXEOeUzuvMvu7cdtB24 tMZVnlIxZ5qe59phs9+xQGjGqi31siCC+Pp6JOR6gBkwIevv4RxLfUZ8B3CUPv2Rls Cisj1dqc3fItg== X-Nifty-SrcIP: [110.4.221.123] Date: Tue, 21 Sep 2021 06:27:37 +0900 From: Takashi Yano To: cygwin-developers@cygwin.com Subject: Re: cygrunsrv + sshd + rsync = 20 times too slow -- throttled? Message-Id: <20210921062737.13448347e0fc28a9a3dae38c@nifty.ne.jp> In-Reply-To: References: <20210907122631.65452be8d021ec72259431d5@nifty.ne.jp> <20210909124115.555c6be15d675500617d284a@nifty.ne.jp> <20210909170549.506cc3c1f6029d904fece6dd@nifty.ne.jp> <20210909211940.51ef391e27d43f0421962cb8@nifty.ne.jp> <20210909214246.cd1ff1a3062fea27e51ad4ae@nifty.ne.jp> <33386baf-3b2d-d57f-2ad3-1bd328ed7935@cornell.edu> <20210911075734.aaf37697ba7db2ad14d911a3@nifty.ne.jp> <20210911113517.f74fc3ac1971bbf04c7a9bd1@nifty.ne.jp> <20210920215229.cea5722b2c2fcd7e03917108@nifty.ne.jp> <00f4eca0-2b38-f4bb-98f2-e99e7ee941f5@cornell.edu> 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.3 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: Mon, 20 Sep 2021 21:27:48 -0000 Hi Ken, Thanks for reviewing the code. On Mon, 20 Sep 2021 17:09:48 -0400 Ken Brown wrote: > On 9/20/2021 3:14 PM, Ken Brown wrote: > > + if (wcscmp (name, ntfn->Name.Buffer) == 0) > > + { > > + query_hdl_proc = proc; > > + query_hdl_value = (HANDLE)(intptr_t) shi->Handles[i].HandleValue; > > + qh = h; > > + break; > > + } > > +close_handle: > > + CloseHandle (h); > > +close_proc: > > + CloseHandle (proc); > > Doesn't this mean that query_hdl_proc is not a valid handle any more? So the > attempt to reduce overhead at the beginning of tentative_query_hdl() will never > work. When the handle which name matches the pipe name is found, 'break' is used in the 'for' loop, so the CloseHandle(proc) is not called. Therefore, query_hdl_proc still has valid handle after 'break'. > Other than that, I still think it looks great. But it's complicated enough that > I think Corinna should review it too when she returns. (It also uses Windows > functions that I have no experience with.) Nevertheless, I'm tempted to push it > so that it can get testing, even if Corinna changes it or reverts it later. Thanks much. -- Takashi Yano