From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: igc, macOS avoiding signals Date: Sat, 28 Dec 2024 20:50:22 +0200 Message-ID: <864j2nskup.fsf@gnu.org> References: <799DDBC5-2C14-4476-B1E0-7BA2FE9E7901@toadstyle.org> <87ldvzg7vi.fsf@protonmail.com> <868qrzsojd.fsf@gnu.org> <87a5cffy8n.fsf@protonmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37107"; mail-complaints-to="usenet@ciao.gmane.io" Cc: spd@toadstyle.org, gerd.moellmann@gmail.com, emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 28 19:51:33 2024 Return-path: Envelope-to: ged-emacs-devel@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 1tRbuO-0009Uc-GC for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Dec 2024 19:51:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRbtL-00027e-EN; Sat, 28 Dec 2024 13:50:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tRbtK-00027U-05 for emacs-devel@gnu.org; Sat, 28 Dec 2024 13:50:26 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tRbtI-0002Mv-J9; Sat, 28 Dec 2024 13:50:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=fBD6h7TGw1oH3lTPLNVmVXMZLwsDyLxn4B+7q1G86Ko=; b=mdOL5yFFxjfU csy2N5rHsDoWfwsVrCCigh/iwe8u1f8SgAc8RaScL0EajKobRJYRmWtHOPar014WrK4InGEBQaPD7 /Bi6lUicDMBo5z0KJ78P09E85afCe0TzOyVDwV1xiB5gfK6eEqgjCP2kGF5aZgWgIXYjTzaxCjsQh IG4sxaJiI5RGkFprFfiqdmafV8R3fFh60K5CvYjasgl7ZjixexX59w6n8ikUuPQzBe0UDIf/EuoL3 T+b4Mukkb6DdqKVlKVXhS9U8LR7a5siIvJgHZw77AOcHM7yPdWEpVAxhptKmmXYg3mNTvf/OM/ANx jUh2ay4+3GN0URgkSuiPnA==; In-Reply-To: <87a5cffy8n.fsf@protonmail.com> (message from Pip Cet on Sat, 28 Dec 2024 18:40:30 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:327283 Archived-At: > Date: Sat, 28 Dec 2024 18:40:30 +0000 > From: Pip Cet > Cc: spd@toadstyle.org, gerd.moellmann@gmail.com, emacs-devel@gnu.org > > "Eli Zaretskii" writes: > > >> Date: Sat, 28 Dec 2024 15:12:23 +0000 > >> Cc: gerd.moellmann@gmail.com, emacs-devel@gnu.org > >> From: Pip Cet via "Emacs development discussions." > >> > >> I think we probably need to put instrumentation in the source code, so > >> we gain some idea of how long signals are delayed for when we mark them > >> pending. > > > > What do we expect to learn from this, > > It tests the current code, which does this: > > When a signal arrives, and we can't handle it because we might have > interrupted MPS, we mark the signal as pending in the igc structure. At > some point later, we check the igc structure for pending signals, > reraise them, and unmask them. > > Gerd's experience suggests that the "some point later" happens too late. > This patch gives us measurements. > > It's unrelated to the OS scheduler, AFAICS. Ah, okay. I note that if we'd block signals when calling MPS and unblock on exit, then these delays couldn't have happened, AFAIU.