From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Merging scratch/no-purespace to remove unexec and purespace Date: Fri, 03 Jan 2025 19:09:56 -0500 Message-ID: References: <87zfku6ra9.fsf@gmail.com> <87seql7a3o.fsf@gmail.com> <87o71553yf.fsf@gmail.com> <87jzbsgefi.fsf@protonmail.com> <87plljfxu5.fsf@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2650"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Stefan Kangas , Helmut Eller , emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 04 01:11:06 2025 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 1tTrkw-0000Zg-4O for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Jan 2025 01:11:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTrk6-00008G-22; Fri, 03 Jan 2025 19:10:14 -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 1tTrk3-000088-UU for emacs-devel@gnu.org; Fri, 03 Jan 2025 19:10:11 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTrjx-0001I1-4o for emacs-devel@gnu.org; Fri, 03 Jan 2025 19:10:10 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3D026807D7; Fri, 3 Jan 2025 19:10:02 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1735949397; bh=aGGQocRSbza+rqXeM6O5pASA+1+Kb9sH0UG5JKFH66Y=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=PzRKSiBO/vdtf5de4orgDm7jOFMgy1JaYACroIMRLzah5W9yNnmeb6AIdIe7O0e3l QHLQ2zyc0kGWF3yVBxdrD67LMuIl/o+z7/icwttplIBJzQJSUjsn9QaZXCiNR9CXAI p3aZF3D9ehfl/naaKk1W8o/OOAdn83ZUQx1tL+TMGp44b1Md5EobCnYstaDgwZ2Pgp HDAxOuWt99+MI2ehmRwr4Revx52R6THg+Y5UDgnoxwtcUJ9jy13jMuME8G4S08H0MD 2zzbK/m31podoewkPK6z6XpkCO4clrfVf70EzZ1F5zX6KjosKqS2K+3Paqs3eBVvfd lXszC4ILJylXQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 1C11D803AD; Fri, 3 Jan 2025 19:09:57 -0500 (EST) Original-Received: from alfajor (104-195-200-87.cpe.teksavvy.com [104.195.200.87]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D0D8D12067B; Fri, 3 Jan 2025 19:09:56 -0500 (EST) In-Reply-To: <87plljfxu5.fsf@protonmail.com> (Pip Cet's message of "Sun, 22 Dec 2024 17:10:55 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:327641 Archived-At: >> and the "special set" above is what we usually call the "remembered set". > > TBH, I'm not entirely sure about that one, and I see I misspoke there; > while the object remains immortal (and thus "tenured"), it's no longer > considered skippable; in effect, the object combines the disadvantages > of being young and being old, permanently, rather than clearly being one > of the two. I guess you could say we turn it into an additional root? AFAIK in the context of generational GC, when a write-barrier records a mutation in the old/tenured object, different GCs make different choices w.r.t what is recorded in the "remembered set": the set may record the new target of the pointer that's assigned (assuming it's a pointer), or it record the address of the field that's mutated, or it can record the actual object that's mutated, or it records a "card" (i.e. a somewhat arbitrary memory region that contains the field, usually sized and aligned on a power of 2), ... So IMO what you describe still sits comfortably within the scope of "remembered set". > It becomes much closer to generational GC if you reintroduce "major" GCs > which would recalculate the tenure of all objects, but that's where we > hit the limits of "quick hack" territory, and I don't see a way of > detecting when we would want to do so automatically. Generational GCs don't have "a way of detecting when we would want to do [a major GC] automatically" either. They just use heuristics. Regarding "quick hack", I think the main issue is the write barrier. Stefan