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 15:09:32 +0200 Message-ID: <868qs329kj.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> 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="12389"; 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 14:10:06 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 1tQR9I-00034D-Rj for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Dec 2024 14:10:05 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQR8u-00055w-2u; Wed, 25 Dec 2024 08:09:40 -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 1tQR8r-00053L-KK for emacs-devel@gnu.org; Wed, 25 Dec 2024 08:09:37 -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 1tQR8q-0001Gl-Hu; Wed, 25 Dec 2024 08:09:36 -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=gPp63ppVH/GTM5/7wU/dwkhuZbgtyjgCAvcER8KH6NQ=; b=X9JeTzqO3EZNPad8WB53 vj5SmbmIOVtkBQGEWioU6UgamCakQR6fceFrfV8WaFmC1sxl5aHK3ZPIXi4k1yR9LL32qgfaoz9Ml RefNOixn1Ph/P4tu0o+hu/VW4desQSILZPBQEyYw1fW6Br8oZYzpkwbbA298SZi16qcdO9rVBnxpg tGUOsDIONkTw/F3cRaXA7osNf33CcrnHd1YXwSlckQm8Y1jrqPeaunWki1bDNt/AlqptDfpBMcLfc C8bq/T5gSgRaWWca6/v9t86ducHwcdF3Yd4vBO/kokx/LAcohk2fXhlLMo7ukSXdECxFdBexsr67r XZIszrHzGJOG7w==; In-Reply-To: (message from Gerd =?utf-8?Q?M?= =?utf-8?Q?=C3=B6llmann?= on Wed, 25 Dec 2024 13:50:37 +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:327088 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 13:50:37 +0100 > > > . how is accessing F different from accessing the specpdl stack? > > F's memory is allocated from an MPS pool via alloc_impl in igc.c. Most > objects are allocated from a pool that uses barriers (I think except > PVEC_THREAD). The specpdl stacks are mallocs (see > grow_specpdl_allocation), and uses as a roots. There are currently no > barriers on roots. So you are saying that the answer to this: > > The first question is more important, from where I stand. Looking > > forward beyond the point where we land igc on master, I wonder how > > will be able to tell, for a random non-trivial change on the C level, > > whether what it does can cause trouble with MPS? That is, how can a > > mere mortal determine whether a given data structure in igc Emacs can > > or cannot be safely touched when MPS happens to do its thing, whether > > synchronously or asynchronously? We must have some reasonably > > practical way of telling this, or else we will be breaking Emacs high > > and low. is that we need to trace each datum to see whether it is "used as roots" (what does that mean in practice, btw?) or is "allocated via alloc_impl in igc.c"? Does the latter include all the Lisp objects (except fixnums)? Do we allocate non-Lisp data via alloc_impl, and if so, which data? 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?