From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#19776: timerfd doesn't work when busy-looping Date: Mon, 25 Oct 2021 17:05:10 +0200 Message-ID: <87k0i1w3fd.fsf_-_@gnus.org> References: <87d1tuw42p.fsf@gnus.org> <87tvsc6syh.fsf@mouse.gnus.org> <87h8oc6sfs.fsf@mouse.gnus.org> <83pmrw5hfs.fsf@gnu.org> <875ytmbnk2.fsf@gnus.org> <83y26i34e1.fsf@gnu.org> <87wnm27b57.fsf@gnus.org> <87sfwq75q4.fsf@gnus.org> <87wnm22q7y.fsf@gnus.org> <83ee8a2pm7.fsf@gnu.org> <87fssq2orj.fsf@gnus.org> <875ytm2h37.fsf@gnus.org> <83mtmx19x8.fsf@gnu.org> <8735op9np0.fsf@igel.home> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19203"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 19776@debbugs.gnu.org, stefan@marxist.se, Andreas Schwab , monnier@iro.umontreal.ca, rms@gnu.org To: Dmitry Antipov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 25 17:06:38 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mf1Yb-0004lD-Jp for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Oct 2021 17:06:37 +0200 Original-Received: from localhost ([::1]:43666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mf1Ya-0008LM-3P for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Oct 2021 11:06:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mf1Y2-000819-Eu for bug-gnu-emacs@gnu.org; Mon, 25 Oct 2021 11:06:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60664) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mf1Y2-0008T4-5h for bug-gnu-emacs@gnu.org; Mon, 25 Oct 2021 11:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mf1Y1-0003Uw-TW for bug-gnu-emacs@gnu.org; Mon, 25 Oct 2021 11:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Oct 2021 15:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19776 X-GNU-PR-Package: emacs Original-Received: via spool by 19776-submit@debbugs.gnu.org id=B19776.163517432513391 (code B ref 19776); Mon, 25 Oct 2021 15:06:01 +0000 Original-Received: (at 19776) by debbugs.gnu.org; 25 Oct 2021 15:05:25 +0000 Original-Received: from localhost ([127.0.0.1]:43977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mf1XR-0003Tv-9c for submit@debbugs.gnu.org; Mon, 25 Oct 2021 11:05:25 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:57284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mf1XP-0003Tg-7N for 19776@debbugs.gnu.org; Mon, 25 Oct 2021 11:05:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=enWceoCyHCD2Qg1YFdL6/tyei9rRyBKdGVSkxS8LsBI=; b=k3nlFT/Bc5NNdeysocmKwbh8iC 64owklwFROz8YRHPqCEGULVh6jSt1AjMnBRseoAfokTTdad4NmZ4HJlG+8AGaS9HE5bFBNiNwViqz bukF+eZqBcGyNlDSR7W71HJ0H1ImilQVmCpTHPpClkd1HiIRl3k789OrIBSJePRdjWh8=; Original-Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mf1XC-0002Mb-Oe; Mon, 25 Oct 2021 17:05:14 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEUOCwsgHBwnJSMo RyUZJxUhNx3///9gxvanAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+UKGQ4WCPUhMMoAAACwSURBVDjL zZJNCgMhDIWVsfvRE9ScwEVmL6h7oeP9r9II/dU4dNpC+3Dl5/MlIUJUSaEbiX+WnN917jNKGoQF kgUDcPNqA0+6Aq3rU8OAxgD7yvji4B5ak5qvAkAYywFaCnkcfDfMeVWfLhyfON9BXWq+YZrExseY 8gAEPwDR8WBNA0dU/qDWFLukU0mIDkNoQcEpu4xp6h1Ycl7C0gKKVvX0JdBNZKvyXvHgIvEDnQGf IRovh3etJgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0xMC0yNVQxNDoyMjowOCswMDowMOJ22N4A AAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMTAtMjVUMTQ6MjI6MDgrMDA6MDCTK2BiAAAAAElFTkSu QmCC X-Now-Playing: Krew's _Pres Rebooted_: "Utrata" In-Reply-To: <8735op9np0.fsf@igel.home> (Andreas Schwab's message of "Mon, 25 Oct 2021 16:35:55 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:218300 Archived-At: The timerfd stuff was added in commit 768b24eb0e880c0b39e36fd089905cdca572a758 Author: Dmitry Antipov AuthorDate: Mon Jul 28 10:28:15 2014 +0400 On GNU/Linux, use timerfd for asynchronous timers. so I've added Dmitry to the CCs to get some input. Dmitry, the issue is that with timerfd, no atimers are delivered when Emacs is busy-looping, like: (with-delayed-message 2 "Yes" (while t)) If we disable the timerfd stuff, then the timer will fire after two seconds. So I'm wondering whether this used to work when timerfd was introduced (and this has regressed over the years), or whether it's always been a design constraint that timerfd events would never be delivered when Emacs ways busy-looping? When Emacs is idling (and polling the fds), then the timerfd approach works well, for instance with: (with-delayed-message 2 "Yes" (sleep-for 10)) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no