From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-01.nifty.com (conssluserg-01.nifty.com [210.131.2.80]) by sourceware.org (Postfix) with ESMTPS id 09AFC3858401 for ; Tue, 31 Aug 2021 11:05:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 09AFC3858401 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-01.nifty.com with ESMTP id 17VB531n023506 for ; Tue, 31 Aug 2021 20:05:03 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com 17VB531n023506 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1630407903; bh=9JRuILbf9A9g2ZkE6CphOu2g29KRjUNZ9BLpr1NKHBA=; h=Date:From:To:Subject:In-Reply-To:References:From; b=b5qSGjCXpHazUSk2khC+alaAFq9TGxRSk4z+Omt3ghKLOaS6X7bqIvDWdg2U/gaxx g7r1CsZdTKUmqhUb2AQ6k8crcJ91PNE8wfJj+UCp7fgUA+FN16pEFUNRdWVSwbRLEN eDBn2b3Y/rVB9Z1u2FWGxzraBPVYY6kpV0ro0OW9xcTPnSRH5cyHdMrGNhiYeWA2tc cziHxTCvWKcYnepn+3pVRncJJCCCZNoOofXcmnIJ0iVXEjw1p5/EYK126V9eC3INHI Cl4JSj6Raa+f9dTBzN6qBH6AL0NzqcR2fBc/l2Ot8CR8NVBFPSLsToAgKr+TWoyLOX bKAcAhHH3hezQ== X-Nifty-SrcIP: [110.4.221.123] Date: Tue, 31 Aug 2021 20:05:17 +0900 From: Takashi Yano To: cygwin-developers@cygwin.com Subject: Re: cygrunsrv + sshd + rsync = 20 times too slow -- throttled? Message-Id: <20210831200517.ad3088c901ac430346824bb3@nifty.ne.jp> In-Reply-To: References: <20210830092259.52f7d54fc3fa340738373af4@nifty.ne.jp> <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> 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, 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: Tue, 31 Aug 2021 11:05:45 -0000 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. Where is the WFMO called for pipe handle? -- Takashi Yano