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 057663858402 for ; Wed, 1 Sep 2021 02:39:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 057663858402 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 1812d4le006338 for ; Wed, 1 Sep 2021 11:39:04 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com 1812d4le006338 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1630463944; bh=9SnoFhS/wp4ncjbWf7MCy6EPZRMOLDqAvfCaxfAfNP0=; h=Date:From:To:Subject:In-Reply-To:References:From; b=Fq5m80Yua+MPH14aq1pvmGuOR0l9T4yvAmNFW79cHiDYCHVmFwBH+Stgqh3PBI+iT hkroE0KrYU+fZQr9j8/1M0ds5ZQCLTRsPouOrgITUs1d9tfEAAbSQNS4Zofpo03drN ACHO8QSeL8iQ+bcUACsU/HS1cLmFYnk4b9i2WT24SGufluWnFGmUBWHDzWp6NDuTD5 ZjA+kg1IjLJxHhFiLGaEE1mljQtlTKP4FnDPaCL4QiD6ep2D3t5xSylupybYfmbgzP ugslbsSB4T3wRECfM5ciXURZCl9hnfnUYUv27GqTIjRKYerjiWSXZyYVX8fJRDBiEj Ghq97WK+A801A== X-Nifty-SrcIP: [110.4.221.123] Date: Wed, 1 Sep 2021 11:39:11 +0900 From: Takashi Yano To: cygwin-developers@cygwin.com Subject: Re: cygrunsrv + sshd + rsync = 20 times too slow -- throttled? Message-Id: <20210901113911.7fac8e3399319f311d691146@nifty.ne.jp> In-Reply-To: References: <20210830170204.fa91eaf110f310f13b67abc3@nifty.ne.jp> <20210830210423.00df7f37473b0ac1251e880f@nifty.ne.jp> <932300c9-2e09-5ee5-bbb1-3c060d33e3e1@cornell.edu> <474e1343-9cba-6b3c-b952-c92004968d8f@cornell.edu> <20210831175215.def1505083d496e164fe7ca7@nifty.ne.jp> <20210831200517.ad3088c901ac430346824bb3@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=UTF-8 Content-Transfer-Encoding: 8bit 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 02:39:47 -0000 On Tue, 31 Aug 2021 17:20:25 +0200 Corinna Vinschen wrote: > On Aug 31 20:05, Takashi Yano wrote: > > On Tue, 31 Aug 2021 11:04:05 +0200 > > Corinna Vinschen wrote: > > > On Aug 31 17:52, Takashi Yano wrote: > > > > On Mon, 30 Aug 2021 17:19:44 +0200 > > > > Corinna Vinschen wrote: > > > > > On Aug 30 11:00, Ken Brown wrote: > > > > > > On 8/30/2021 9:51 AM, Ken Brown wrote: > > > > > > > On 8/30/2021 8:55 AM, Corinna Vinschen wrote: > > > > > > > > On Aug 30 21:04, Takashi Yano wrote: > > > > > > > > No worries.  The same should apply to the NtCreateFile side of the > > > > > > > > pipe, btw. > > > > > > > > > > > > > > I'll add my thanks.  I should have checked the default flags that are > > > > > > > typically used for other devices when I wrote nt_create.  I'm glad you > > > > > > > caught this. > > > > > > > > > > > > > > So I'll reinstate the use of nt_create and then let Takashi recheck everything. > > > > > > > > > > > > I've done this now. I'm still not sure I've got all the flags right. For > > > > > > unknown reasons, I've used FILE_SHARE_READ | FILE_SHARE_WRITE in the call to > > > > > > NtCreateNamedPipeFile, and no sharing in the call to NtOpenFile. Should I > > > > > > also use FILE_SHARE_READ | FILE_SHARE in NtOpenFile? Is sharing even > > > > > > relevant in this context? > > > > > > > > > > This is only relevant if you want to open the pipe from another context, > > > > > calling CreateNamedPipe/CreateFile. As long as the pipe is only > > > > > duplicated, it shouldn't matter at all. > > > > > > > > > > But, as I just wrote in my previous mail, the FILE_SYNCHRONOUS_IO_NONALERT > > > > > flag is probably a good thing for C# apps, but not for Cygwin, because it > > > > > enforces synchronous operation. Sorry about that... > > > > > > > > With FILE_SYNCHRONOUS_IO_NONALERT, what kind of problems are you > > > > specifically concerned about cygwin pipe? > > > > > > We're using asynchronous IO to be able to call WFMO and thus to be able > > > to handle signals and thread cancellation events. Wit hsynchronous IO > > > this is not possible. > > > > Thanks. How can I regenerate above issue? Stopping by Ctrl-C or killing > > the process by kill seems to work even with FILE_SYNCHRONOUS_IO_NONALERT. > > It may depend on the thread you're running this in. But really, just > call a blocking (SYNCHRONIZE + FILE_SYNCHRONOUS_IO_NONALERT) ReadFile > in the main thread of a Cygwin app, and you'll see that neither Ctrl-C > nor kill signalling will get through. I confirmed the issue with FILE_SYNCHRONOUS_IO_NONALERT. Thanks. -- Takashi Yano