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: Some experience with the igc branch Date: Wed, 25 Dec 2024 16:37:47 +0200 Message-ID: <864j2r25hg.fsf@gnu.org> References: <87o713wwsi.fsf@telefonica.net> <87ldw7fwet.fsf@protonmail.com> <87a5cnfj8t.fsf@protonmail.com> <86seqe4j4f.fsf@gnu.org> <87ttaucub8.fsf@protonmail.com> <87pllicrpi.fsf@protonmail.com> <864j2u442i.fsf@gnu.org> <87ldw6as5f.fsf@protonmail.com> <86o7112rnq.fsf@gnu.org> <867c7p2nz4.fsf@gnu.org> <861pxx2lh7.fsf@gnu.org> <86ldw40xbo.fsf@gnu.org> <868qs329kj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="692"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pipcet@protonmail.com, ofv@wanadoo.es, emacs-devel@gnu.org, eller.helmut@gmail.com, acorallo@gnu.org To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 25 15:38:42 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 1tQSX4-000Aco-0A for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Dec 2024 15:38:42 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQSWN-00061b-Ql; Wed, 25 Dec 2024 09:37:59 -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 1tQSWH-00061D-TC for emacs-devel@gnu.org; Wed, 25 Dec 2024 09:37:54 -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 1tQSWG-0005Rf-Ur; Wed, 25 Dec 2024 09:37:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=JycS/GdmnZQY6MZIoDANv5Sn+k9yxGGylkTWgATqrTg=; b=UqXAyINcpztarueln8oj 3A8sJytFx4xPJldfKuBqYPUPZ2v3wsV7WkuqtQ8cg8zHJmZ523FjqpdWmBjFvcnqld8HV28F6hFJs 5VJWJ2ztEid/G1xdBhgv50PVJkdwRZwt7dlxlfAe+1Cfy3xpWaBRTARwpuAiyTVovNw6tF4rd87zN dSWqH58fgzOvmKcFpingUgYLx2m2j5tNMhQO7DFdVuvvJ/WRoP31NHqbyd4LHo9LYKfdVr6NihZ+l KxU4v3sEE+nE5fpDLI771+iYC52cbaYqOP4/GrGFyCTwDjHmABdrRcg1jXPXCI8p/HCtnguamLTyj Nwflk56GegOApg==; In-Reply-To: (message from Gerd =?utf-8?Q?M?= =?utf-8?Q?=C3=B6llmann?= on Wed, 25 Dec 2024 14:46:44 +0100) 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:327101 Archived-At: > From: Gerd Möllmann > Cc: pipcet@protonmail.com, ofv@wanadoo.es, emacs-devel@gnu.org, > eller.helmut@gmail.com, acorallo@gnu.org > Date: Wed, 25 Dec 2024 14:46:44 +0100 > > Roots: There are GC roots in the old GC. Specpdl stacks are roots, > DEFVARs, control stacks, DEFSYM symbols, the bytecode stacks and so on. > They are marked first at the beginning of GC. The roots and everything > recursively reachable from them are all live objects. > > Roots in igc are basically the same thing. There are MPS function with > which one can define roots, if you mean that by "what it means in > practice". These MPS functions are called in igc.c. Please don't ask > which functions :-). > > alloc_impl: This function is used for the allocation of all Lisp > objects, vectors, strings, frames, everything that can end up being > references as Lisp_Object. So everything except fixnums. And it is not > used to allocate other stuff, the xmalloc family of functions is used > for that. OK, thanks. So there are Lisp objects allocated by alloc_impl, roots allocated via MPS, and data allocated by xmalloc that MPS doesn't know about, is that correct? > > Once again, I think this is very important for future maintenance. I > > feel that this barrier thing in MPS introduces significant > > complications into reasoning about safety of C-level changes. > > Previously, we only had the mark bit to worry about if we wanted to > > access Lisp objects during GC (see gc_asize, for example), but now we > > have a much larger problem, AFAIU. How do we manage that for the next > > 40 years? > > These problems do not exist. The barriers are transparent for the > application, except in vary special circumstances, namely this shit > signal handler. But I _am_ talking about this "shit signal handler". I'm trying to understand how would I go about reasoning whether accessing specpdl from the signal handler is okay. Is that because I'm supposed to know that the specpdl stack is a root? If so, I'd need to figure out that for every datum the handler accesses, no? I guess I'm yearning for some commentary in igc.c, not unlike what you wrote in xdisp.c at the time, which would explain the basics, like what are roots, what's the purpose of all those root_create_SOMETHING functions, what's the difference between exact and ambiguous roots, etc. Because currently we are not too spoiled by comments in igc.c.