delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:from:to:subject:date:message-id:references | |
:in-reply-to:content-type:content-id:content-transfer-encoding | |
:mime-version; q=dns; s=default; b=hRVwJbkL3/EfyIw4j201jcK3sTMzr | |
VCO/+Ap+yHHWGnEgtUppmnTlYOpQoPExNRP8ZCkeNgKUpqwdpoqmran6mFo52+1w | |
pYYxfgxkfclCVRs5cLTI+dcOofn/M9I3FlOthC5rYufsfuvbf7GDLinyiGNAhphW | |
DpddRawAAjmHkQ= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:from:to:subject:date:message-id:references | |
:in-reply-to:content-type:content-id:content-transfer-encoding | |
:mime-version; s=default; bh=53Q0RVw1MD09juLsfwp1UooopDc=; b=fei | |
whibsiFSEn/aYqa0a3oSbbz3RIihxBAlXaOUd4acfOHDGGXRDgQZBGaoM1hDnHUm | |
+/6mbrBr+Anp/IGKumf1W1ayeGd3kYXw3pKqulZqukGSXqENaWKkKQUh23c+oMCy | |
2rePtnYbyRXQsus1cahU6WERd59egmjMLyeaLzU4= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Spam-SWARE-Status: | No, score=-1.9 required=5.0 tests=BAYES_00,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=timer |
X-HELO: | NAM03-DM3-obe.outbound.protection.outlook.com |
DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=cornell.edu; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Cy03cv1N2IXhfoSmzm5otVn6YiOcT70UMs7pLlbpFgc=; b=rL3PjH2YGvvR0Bnr3PaijIQCbRhKtaSZi/Hek0a4bmLgYhSnee1Dpe2yDjukjlsp5DBTNOHHetBHXBcHW2Tp2RuoWIhLDmWIgAXDyfVoC4uFD5Ph656eM7QZ2IY4dZyTJ4AFIbRaG52SAm3ZyZ3fIgnKSH6nWz/vw4iASTzlx2c= |
From: | Ken Brown <kbrown AT cornell DOT edu> |
To: | "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com> |
Subject: | Re: The timerfd functions slow down emacs |
Date: | Sat, 23 Feb 2019 22:52:32 +0000 |
Message-ID: | <9ba7f107-896d-d035-29cd-e4bce1661c97@cornell.edu> |
References: | <04048cc3-091a-b55c-372b-bde29273d952 AT cornell DOT edu> <1df3d7ce-1427-cbd4-0978-7236b1903440 AT cornell DOT edu> <20190223191542 DOT GS4256 AT calimero DOT vinschen DOT de> <0f2789ab-5722-c0de-6176-d4e1aaff9f81 AT cornell DOT edu> <20190223210152 DOT GA4133 AT calimero DOT vinschen DOT de> <c316e5bd-0929-fc8a-0e3d-cc5671416866 AT cornell DOT edu> <20190223221141 DOT GB4133 AT calimero DOT vinschen DOT de> |
In-Reply-To: | <20190223221141.GB4133@calimero.vinschen.de> |
user-agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 |
authentication-results: | spf=none (sender IP is ) smtp.mailfrom=kbrown AT cornell DOT edu; |
x-ms-exchange-purlcount: | 1 |
received-spf: | None (protection.outlook.com: cornell.edu does not designate permitted sender hosts) |
x-ms-exchange-senderadcheck: | 1 |
MIME-Version: | 1.0 |
X-MS-Exchange-CrossTenant-mailboxtype: | HOSTED |
X-IsSubscribed: | yes |
X-MIME-Autoconverted: | from base64 to 8bit by delorie.com id x1NMrRn9006686 |
On 2/23/2019 5:11 PM, Corinna Vinschen wrote: > On Feb 23 21:24, Ken Brown wrote: >> On 2/23/2019 4:01 PM, Corinna Vinschen wrote: >>> On Feb 23 20:48, Ken Brown wrote: >>>> On 2/23/2019 2:15 PM, Corinna Vinschen wrote: >>>>> Below's the NSSTC I used to test my timerfd implementation (based on >>>>> another STC to show a problem in POSIX timers). From what I can tell it >>>>> works as desired. If you find a problem, please point it out or send a >>>>> patch. >>>> >>>> Thanks, that saved me a lot of time. I was in the process of creating a test >>>> case when your mail arrived. >>>> >>>> Your test works fine. For example: >>>> >>>> $ gcc timerfd_test.c -o timerfd_test >>>> >>>> $ ./timerfd_test.exe 3 1 10 >>>> 0.000: timer started 52379 >>>> 2.988: 52379 read: 1; total=1 >>>> 3.988: 52379 read: 1; total=2 >>>> 4.989: 52379 read: 1; total=3 >>>> 5.987: 52379 read: 1; total=4 >>>> 7.001: 52379 read: 1; total=5 >>>> 7.987: 52379 read: 1; total=6 >>>> 9.001: 52379 read: 1; total=7 >>>> 9.987: 52379 read: 1; total=8 >>>> 10.987: 52379 read: 1; total=9 >>>> 11.997: 52379 read: 1; total=10 >>>> >>>> But if I change CLOCK_MONOTONIC by CLOCK_REALTIME in the call to timerfd_create, >>>> then I get the following: >>> >>> Only in timerfd_create? Not in clock_gettime? If you don't >>> do that, you're using a different clock with entirely different >>> values for the starttime. >>> >>> Actually, this testcase started with CLOCK_REALTIME in both calls. >>> If I revert to that, I get: >>> >>> )$ ./timerfd 3 1 10 >>> 0.000: timer started 644 >>> 3.001: 644 read: 1; total=1 >>> 4.001: 644 read: 1; total=2 >>> 5.017: 644 read: 1; total=3 >>> 6.001: 644 read: 1; total=4 >>> 7.001: 644 read: 1; total=5 >>> 8.009: 644 read: 1; total=6 >>> 9.002: 644 read: 1; total=7 >>> 10.001: 644 read: 1; total=8 >>> 11.010: 644 read: 1; total=9 >>> 12.017: 644 read: 1; total=10 >>> >>> I tested this STC with differnt clocks, but it's important to >>> use the same cloack for clock_gettime and timerfd_create. >> >> Yes, that was careless of me. I now get the same results as you. I'll have to >> go back to the emacs sources and see what else might be different there. > > You're right, nevertheless. Select on timerfd returns immediately. > I (hope I) fixed that in git and uploaded new developer snapshots to > https://cygwin.com/snapshots/ > > Please try especially with emacs. That fixes the emacs problem. Thanks! Ken -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |