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=ugGOMpO6zq6vDBuiBhZZp07tZtr/x sc5N456my3TxTwRkPLbnj1XH05JGyoXF6pY/rP19nsAZt+vUZ016rXrN7PLDgxtB 3r9QeWlP/P8+W13fUVcXBc41WD4Pvv8ysS+BGYrn1pQSytD8+GRwav6S68IwE2Bd 7fzxiU0SbW56Y4= 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=qfBO4hZAZqBuXGhiWMQaPSCNzO4=; b=lYr TkSHVwPj9yG8Ajo8XKP83hRcGDwbuq6imSMSJqr8J0aOTRcp6hnP53J63s0oKF1M CXIDa9zrK2sEDOrQT9tmTiDcgWhwn/du2caE4un+6DN4yiz+OHUCLy3jLAPcoE49 dif7PoMdFIQYEMllrg5BZ1TdM46BI5oTLrBDMm7E= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=9001, 11997, timer, H*M:6176 X-HELO: NAM02-BL2-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=Up7dvGKeIy6E+SwjojV5fOEfT0i3btx4uRP9/zhMjdU=; b=rqLsWBLfPbcXIp8oUQDfkb/PrmQjPdqqZEhOxckegBfgocfSao70G7a+kEmIC3jUgotvONMobM8VvrBJ/o1DKyZ7EkOVXz0Gtzm1KQqTNhULj5vOImRqqnDC+9T+FhQjDVgd+IbsLpKcAUzOkw3xJA6oGTH1gLljCXxLC+V9zDQ= From: Ken Brown To: "cygwin AT cygwin DOT com" Subject: Re: The timerfd functions slow down emacs Date: Sat, 23 Feb 2019 20:48:30 +0000 Message-ID: <0f2789ab-5722-c0de-6176-d4e1aaff9f81@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> In-Reply-To: <20190223191542.GS4256@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; received-spf: None (protection.outlook.com: cornell.edu does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 Content-Type: text/plain; charset="utf-8" Content-ID: MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id x1NKnfIH026833 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: $ ./timerfd_test.exe 3 1 10 0.000: timer started 52385 0.006: 52385 read: 1550343072; total=1550343072 In particular, 'select' returns immediately. In the case of emacs, BTW, timerfd is called like this: fd = timerfd_create (CLOCK_REALTIME, TFD_NONBLOCK | TFD_CLOEXEC); 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