From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: MPS: native comp Date: Tue, 30 Apr 2024 08:59:10 -0400 Message-ID: References: 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="21182"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org, Helmut Eller To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Apr 30 14:59:38 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 1s1n56-0005HB-MY for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Apr 2024 14:59:36 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s1n4u-00007n-QX; Tue, 30 Apr 2024 08:59:27 -0400 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 1s1n4h-0008Tg-9S for emacs-devel@gnu.org; Tue, 30 Apr 2024 08:59:12 -0400 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 1s1n4h-00075O-0h; Tue, 30 Apr 2024 08:59:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=e9stZ1UAnc2fnNXgi9F54iFiyXVwZUG/Pfwi5tOAFy0=; b=Tv/wv0GjH3jsTUYYwxpB qgUc1tvkReBwrVjnn2pLABRrsFMxbfuMCrecVpbdPP4j386fUSGGmUh+aIqIQjObneQm7xHRJCGQV LCOwVzpcwuTZ1nGw+lBLIaKXGu89JizSPTfqeBg+6DOPuXslm7pW4jl8EPR7ggnDZro6XU8tbj0Rr ayuoortk5XTZvdYf0c+eM6islOZ7hMfLzyu0Y4m++rF7l1l8/NpVF9QWYF4OmteTxo+R/FNGBSVIg t4bQe+fiSh+PD4/Za/nlg/8zd+9obDKYc6N6OMfNdwtIV044yexEhep3ofJHJOiL2A78h2sVCkA6z U32WWEI0DkFIXg==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1s1n4g-0005FK-OK; Tue, 30 Apr 2024 08:59:10 -0400 In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Tue, 30 Apr 2024 13:54:50 +0200") 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:318423 Archived-At: Gerd M=C3=B6llmann writes: > Andrea Corallo writes: > >>> The exact algorith MPS implements I don't know either. The docs include >>> some design documents, but I haven't read them all, and some I didn't >>> understgand because there was some context missing. >>> >>> A number of possible algorithms that could be used are described in the >>> literature, or one could glance at existing GCs for V8, for example. >>> Hard to read though, for me at least. >> >> I think is mandatory that at least some of us understand at least the >> high level mechanism of how MPS works otherwise before of later we will >> be beaten by it somehow. > > Speaking for myself, I think I have some understanding. > > Opa telling stories from the good old times again :-): Back in, I don't > remember exactly anymore, around the late 1890s ;-), not long after the > invention of sliced bread, I was implementing a GC for Emacs that was > very similar to MPS. Incremental, generational, mostly-copying, > barriers, but not concurrent. Concurrency was not that big a thing back > then ISTR. That was torpedoed hearing of the existemce of a software > patent for the mostly-copying algorithm, which I consider a trivial idea > :-(. (The patent has expired 10 years or so ago.) > > All that's left of that is a C source file I posted to emacs-devel when > I left, which was also named igc.c, what a coincidence :-). I got that > some time ago from Stefan Monnier, who had kept a copy. I seem to have > lost it again. Not a loss. > > Be that as it may. What I eanted to say is that I feel for myself I have > a good model of what MPS does in my head. I personally don't want to > dive into details of its code. It's a library for me. A good one I'd > say, and well documented. And if it does A or B is not important to me, > unless I land there in a debugger, and then I can see it. I don't have any doubt you have knowledge of GCs (I do as well to a certain degree) or how the MPS interface works. But still my basic question is unanswered and we don't know how MPS can work reliably in a parallel fashion moving objects. > I'm actually trying to spread some knowledge by talking/writing too much > sometimes. I know I'm in general not good at such things. And I'm of > course not an encyclopedia, or professor for garbage collection. > >> My fear is that the GC requires the code is generated respecting some >> property way we might not respect. Other issues might rise in the >> future if we don't understand all of this. > > No special casing required for MPS. If it's valid in C, it's fine. Maybe depending on how the C is written (keeps local non volatile references to objects) the collector can move objs or not in parallel? Or maybe the moving part never happen in a parallel fashion? =F0=9F=A4=B7 I'm saying we'll have to understand all of this (willing or not). Thanks Andrea