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: Merging MPS a.k.a. scratch/igc, yet again Date: Tue, 10 Dec 2024 15:47:18 +0000 Message-ID: References: <8634iwex8q.fsf@gnu.org> <87plm0msrq.fsf@telefonica.net> <87zfl4npcd.fsf@debian-hx90.lan> <87ldwnn0ny.fsf@telefonica.net> <874j3bmtvr.fsf@telefonica.net> 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="16809"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?utf-8?Q?=C3=93scar_Fuentes?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 10 17:34:58 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 1tL3CK-0004AD-Uo for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Dec 2024 17:34:56 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tL3BQ-0007JH-E2; Tue, 10 Dec 2024 11:34:00 -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 1tL2SM-0004x8-9K for emacs-devel@gnu.org; Tue, 10 Dec 2024 10:47:27 -0500 Original-Received: from mail-10629.protonmail.ch ([79.135.106.29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tL2SK-0002Qe-8c for emacs-devel@gnu.org; Tue, 10 Dec 2024 10:47:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1733845641; x=1734104841; bh=Waf/EO9wUExo7iTldpMsjkF27EEwoN44nCjgyQpcDfo=; 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=ePWsvOJBaRMTN+iAnFfZpIC6oJdYhabt///+Teb3FfcYXiryjPDXMqww/mYzLCv/G P5o/RftiBC3AuhC7NnJbKzwlxcSMtXxznWl4R90/8NhJT7JK2ofjc9C3es9jyNWe8a j9L9D9uKycS6sR8zJVmnRs3ATQTzrDyatvLT0vhWZXLxNONCgZ8SIxV6G6T38/yQar VrQY3tEiN5+sOczCH94VbTED2GilJ0ylo/egC+CE1YxhSFje9ekKpsoJ7rbD5A3s0O KQe9AO1u+9/OISMobjO96yrcuL0qpbPz4XhbswQejSTh42KB83GydZK0cyvtJT1sop FprndkDSkvsQA== In-Reply-To: <874j3bmtvr.fsf@telefonica.net> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 82a758ea497cc4877d2873195a47be879dba59ce Received-SPF: pass client-ip=79.135.106.29; envelope-from=pipcet@protonmail.com; helo=mail-10629.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_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 10 Dec 2024 11:33:59 -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:326298 Archived-At: On Tuesday, December 10th, 2024 at 15:37, =C3=93scar Fuentes wrote: > Pip Cet pipcet@protonmail.com writes: >=20 > > > * MPS does a performance-critical job. Using it as a shared object mi= ght > > > incur in a performance penalty. Having it in source form alongside th= e > > > Emacs sources will result in opportunities for optimizations (LTO, > > > PGO, ...) that may bring better performance. > >=20 > > ...and more problems. MPS has made the decision not to work with gcc > > -O3, only with -O2 or less, and LTO in particular is something MPS > > cannot reliably support, IIUC. >=20 > That sounds worrysome. If I understand the implications of what you > wrote, MPS basically depends on what the specifics of what gcc does. But No compiler can perform cross-object linking without LTO, so we're safe the= re. > gcc can do something else on future versions... not to mention what > happens if the user wants to use other compilers. GC in general depends a lot on the compiler (and the programmer) not misbeh= aving. It is perfectly legal for a C compiler to scramble a pointer in a re= gister, for example, but all conservative stack marking GC approaches will = fail to recognize such a scrambled pointer and crash. > Can you point me to a description of how MPS is related to compiler > optimizations and specifically to LTO? I'll have a look. IIRC, setjmp() and the "void *top_of_stack =3D &top_of_s= tack" trick failed to properly detect all registers when the entry point wa= s being inlined across objects, and Ravenbrook decided against moving to as= sembly code for those entry points. Of course there's also the scrambled frame pointer problem, but that's abou= t what the client code does, not just about the MPS code. > > > * MPS does a correctness-critical job. Depending on multiple external > > > sources for such core component is a recipe for problems (future > > > changes by the MPS maintainers, patching by packagers, buggy > > > compilers, etc.) We need to keep a close watch on what MPS incarnatio= n > > > we use. Better yet, total control. > >=20 > > I think the correctness argument goes both ways: shared linking means > > bugs may be fixed for you automatically, as is routinely the case with > > libc. >=20 > libc is a central piece of any GNU/Linux distribution and therefore much > cared by the packagers. MPS not so. Fixes on minor packages like MPS can > take years to propagate through the distro universe, if at all. Very good point, thank you. > > > For those reasons, incorporating MPS into the Emacs sources is the ri= ght > > > thing to do. > >=20 > > I don't think that's an option, because Emacs should remain capable of > > switching to GPLv4 if and when that is released, and we don't know > > whether the MPS license is compatible with such a future document. >=20 > Yeah, the licensing point is what I was too afraid to mention :-) Don't get me wrong: if Ravenbrook were to assign copyright to the FSF, incl= uding it in Emacs would be TRT, but that's unlikely to happen. Pip