From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.187]) by sourceware.org (Postfix) with ESMTPS id B9C7A3858408 for ; Tue, 31 Aug 2021 09:08:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B9C7A3858408 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=cygwin.com Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mbies-1mrJu118ta-00dFtj for ; Tue, 31 Aug 2021 11:08:43 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id DA635A80D9A; Tue, 31 Aug 2021 11:08:42 +0200 (CEST) Date: Tue, 31 Aug 2021 11:08:42 +0200 From: Corinna Vinschen To: cygwin-developers@cygwin.com Subject: Re: cygrunsrv + sshd + rsync = 20 times too slow -- throttled? Message-ID: Reply-To: cygwin-developers@cygwin.com Mail-Followup-To: cygwin-developers@cygwin.com References: <20210830091314.f9a2cb71794d0f68cdb5eba7@nifty.ne.jp> <20210830092259.52f7d54fc3fa340738373af4@nifty.ne.jp> <529d7dd7-d876-ca51-cc1f-e414d3c24f71@cornell.edu> <20210831175534.21edae2356d74a0750c686de@nifty.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210831175534.21edae2356d74a0750c686de@nifty.ne.jp> X-Provags-ID: V03:K1:6sMjgJEt6v15TF38H/6mKMIdpb+Jox0pNXVtoTRDJbMSHnUWu2O ho62BteAJjQhsb5j67rquZVlCAUKacdmb+upb50bHWu8HvjBfpptoJDmFdmuASKFBs1YA+O bK6h3jUDr/h8GhigGP+NRWZbOX2QUEHt/i3n9YMyKAlYGsiEC0vRFx/v7KjphPx+rhpIrnw QeL1X1O9no/sUBoArecvQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:Lfyifri03jg=:r1Czk7bWliJ7RcNNmYwKF2 Xze6/vugdUdUPpqq73aDXnIhPgbAFfi2jqjeMKO90MFsxrp8LdvxBExj/kUCfRoiMxhlhbJvd 9nWnD5PMCr7rcQau4NVt/DaYj6ClmfLNn/DTSB4gv+XvNwG/xs6p/BiitPLgpSSMOk8UrQ3l6 h0lRxdrRJ//U8V4IUsaGVee5BdMhJYHGuCAUppleuUshUudi5Hiiu/I9n1CrcInUfcF2uk2w+ JIWaDHKgB+xPflktktSrIuhIHMgAajs6fxYr8EwDx1TtB8Ld8XtnUm2CIlm+ZvUnTMZjLgmql 4YDPb+zKh3evnm37Fpj0pTrQRU02i8kitY6/0E+kZEARLEhLFzkOXjsMY7yYuZgno/4rmFf+L 8lzfJ1uBpYc0CkPzTu09iRgDG5UXEdnRVcqZIo/TEHB2T4jy03AZVGKv51UkOnleh/P5NkhC3 SQBryn6L0CX7AxWzj41fRbHBNuMnpSsfgc9v+mSbFXio84T1ANFi8+m7BO81niDgvWQ14Jty0 bLcaXBohdf43O+9BG5uYH19ThaYiv4MdLRqlJJsIgpYg0wF7O2/B1hJx1hvAnRyFzrfQeOtTQ rrwN/d11dCz7Y512voMjU76oZgXFfcLYh7hoTXlnfzZhVg2pojZzmfyt/Whn+sOFS7N8HjH+c xmXuxhpohRQNMvVTIhOltOXeEpjEYfHvebK2fwxRLql6YVVJiaghOwNOCWKU0YdLsgFFBQEHY Qi+pRt5H7b/HDjNoUp2DavZ4XtDn6CldMPZ8jqybHgrVGFyVNa6nuuuBOdA= X-Spam-Status: No, score=-100.0 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, 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 09:08:46 -0000 On Aug 31 17:55, Takashi Yano wrote: > On Mon, 30 Aug 2021 22:14:15 +0200 > Corinna Vinschen wrote: > > Hi Ken, Hi Takashi, > > > > On Aug 30 19:00, Corinna Vinschen wrote: > > Well, what about keeping a duplicate of the read side handle on the > > write side just for calling NtQueryInformationFile? > > > > Attached is an untested patch, can you have a look if that makes sense? > > > > Btw., I think I found a bug in the new fhandler_pipe::create. If the > > function fails to create the write side fhandler, it deletes the read > > side fhandler, but neglects to close the read handle. My patch fixes > > that. > > > > While looking into this I found a problem in fhandler_disk_file in > > terms of handle inheritance of the special handle for pread/pwrite. > > I already force pushed this onto topic/pipe. > > I tested your patch attached. Unfortunately, select() does not work > as expected for write pipe. Even if the select reports write pipe > is available, writing to pipe fails. It seems that your patch fails > to detect pipe full. Bummer. Is that with byte mode pipes or with message mode pipes? If the latter, if you try to write more data than available in the buffer, it's bound to fail. Did you add debug output to pipe_data_available to see how the information looks like? Or do you have a simple, self-contained testcase in plain C? Thanks, Corinna