From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: Some experience with the igc branch Date: Fri, 27 Dec 2024 17:26:04 +0000 Message-ID: <87seq93uo7.fsf@protonmail.com> References: <87o713wwsi.fsf@telefonica.net> <86ldw2zy6s.fsf@gnu.org> <867c7lw081.fsf@gnu.org> Reply-To: Pip Cet Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8481"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?Q?Gerd_M=C3=B6llmann?= , stefankangas@gmail.com, ofv@wanadoo.es, emacs-devel@gnu.org, eller.helmut@gmail.com, acorallo@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 27 20:33:16 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 1tRG5E-00021I-Bv for ged-emacs-devel@m.gmane-mx.org; Fri, 27 Dec 2024 20:33:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRG4D-00021k-Qc; Fri, 27 Dec 2024 14:32:13 -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 1tRE6J-0006OI-2a for emacs-devel@gnu.org; Fri, 27 Dec 2024 12:26:15 -0500 Original-Received: from mail-4322.protonmail.ch ([185.70.43.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tRE6H-0006cu-2g; Fri, 27 Dec 2024 12:26:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1735320370; x=1735579570; bh=7GczQ+gPLI1c6VdeCnLJEHifcb9bxCyQ7MeVunpVABA=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=yqQFOUwTTQ2rdhor+JKGxDmUxsuZQMETYhHabUrvLcFhD4Ls6cKcaznx/sQ7jIuvH tljgZdecPnrsON9pswK24VMWPFqqlcmfGFff6uW+czcxLWuMYHrNod1TgC7OLrU3gl l8nrlzYn8Xi01+Zchu7C+HwJ35WTdzbyXX2CorFXdeyViCcT8kE0BEGtpQz1uovuUb umqDWWkOQp3l/+1DXRjSoRapwZszo9wJcg1LHaN7RByEfSUwnHw75QNNsWU/XVfCR0 BGBJyhLUjO5W86Yg8U/iUedtevZHfdowr54ppT68/VJMdUzdZ45hJERudYLnH/MuUR cwb61YfCnapEw== In-Reply-To: <867c7lw081.fsf@gnu.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 26082204409166428a54233fdfc480f16e4f7dcc Received-SPF: pass client-ip=185.70.43.22; envelope-from=pipcet@protonmail.com; helo=mail-4322.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 27 Dec 2024 14:32:10 -0500 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:327226 Archived-At: "Eli Zaretskii" writes: >> From: Gerd M=C3=B6llmann >> Cc: Eli Zaretskii , pipcet@protonmail.com, ofv@wanadoo.e= s, >> emacs-devel@gnu.org, eller.helmut@gmail.com, acorallo@gnu.org >> Date: Fri, 27 Dec 2024 14:56:06 +0100 >> >> Gerd M=C3=B6llmann writes: >> >> > I've reached the point where I don't know what else to explain. Could >> > always be improved, of course, and so on. Please find attached, with >> > request for feedback. >> >> Ahem, just remembered that I had already an admin/igc.org in the branch, >> so I've now replaced that with what I've written. > > Thanks. Some questions about that file: > > In contrast, the new igc collector, using MPS, is > > - Concurrent. The GC runs in its own thread. There are no explicit > calls to start GC, and Emacs doesn't have to wait for the GC to > complete. > > Pip says this is not true? I'm a bit confused. Right now, on scratch/igc, on GNU/Linux, for Emacs in batch mode, it isn't technically true. This causes the signal handler issue, which we're trying to solve. One of my approaches is to MAKE this statement true, by using a separate thread for allocation (which triggers GC) and access faults (which call into MPS, which counts as triggering GC in my book). > I also thought MPS GC runs concurrently in its own thread. That's what you should think: GC can strike at any time. If your code assumes it can't, it's broken. As far as everybody but igc.c is concerned, it's safer to assume that GC runs on a separate thread. igc.c currently detects (with false positives) the one very special situation in which it is UNSAFE to assume that, and acts accordingly. The allocation thread patches would make it so the assumption is actually true. Pip