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: Some experience with the igc branch Date: Fri, 27 Dec 2024 15:47:04 +0000 Message-ID: <875xn55dtn.fsf@protonmail.com> References: <87o713wwsi.fsf@telefonica.net> <86ldw2zy6s.fsf@gnu.org> <87h66p5fy6.fsf@protonmail.com> <86cyhdw3ey.fsf@gnu.org> 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="34344"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, stefankangas@gmail.com, ofv@wanadoo.es, emacs-devel@gnu.org, eller.helmut@gmail.com, acorallo@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 27 16:59:36 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 1tRCkS-0008nR-5L for ged-emacs-devel@m.gmane-mx.org; Fri, 27 Dec 2024 16:59:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRCkF-0004jE-DJ; Fri, 27 Dec 2024 10:59:23 -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 1tRCYT-0002eo-DF for emacs-devel@gnu.org; Fri, 27 Dec 2024 10:47:13 -0500 Original-Received: from mail-40133.protonmail.ch ([185.70.40.133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tRCYR-0004b6-Qm for emacs-devel@gnu.org; Fri, 27 Dec 2024 10:47:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1735314428; x=1735573628; bh=03aZPG2oSzapj5hc0Dbscq3D82S8LlJiMwj5OKPPjS0=; 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=gF9Ek6Y36Yj4XxHcaoW1Jyj5HBVI36idBeV504u1C94urfggHUXBHkY3uRedI+J2x n+Pypp+iyW7nN5sfA224q3IDvT8tQ12WlNjQHU6e5ihA0dNimxxrm+qnxQaigQ1qL7 0/OVSCIjkR0Q+MaNcvlAtk9FDFuz0cdD2/C4Dj4CVHTL0G/WuUBUmPwa1ZsW27UuHI oSeI+BUDLbiE0Og+Xq6+t0Wssuqrv5ioFAjC2c64/O8Agwe5qJXXgWSRcCg4Jvi2f3 Pi7XniEANc68Y8AFa31b+HW2C2qieacE77138Dkg0JxiAiyKAVkNGDBk4+I6qcLAIt ekx0k0KJ9Pp+g== In-Reply-To: <86cyhdw3ey.fsf@gnu.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 5e5d497fdf629f91d08353c4d57309e6c5d21313 Received-SPF: pass client-ip=185.70.40.133; envelope-from=pipcet@protonmail.com; helo=mail-40133.protonmail.ch X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 27 Dec 2024 10:59:20 -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:327212 Archived-At: "Eli Zaretskii" writes: >> Date: Fri, 27 Dec 2024 15:01:11 +0000 >> From: Pip Cet >> Cc: Stefan Kangas , Eli Zaretskii = , ofv@wanadoo.es, emacs-devel@gnu.org, eller.helmut@gmail.com, acorallo@gnu= .org >> >> > - Concurrent. The GC runs in its own thread. There are no explicit >> > calls to start GC, and Emacs doesn't have to wait for the GC to >> > complete. >> >> I don't think that's true right now (it is what I want for Christmas, >> though). On GNU/Linux, the GC usually runs on the main thread. > > Isn't it both, actually? That is, MPS could be triggered both > synchronously and on a separate thread? That's what I thought. It's what the rest of Emacs should assume, IMHO, but it's certainly not true that GC "runs in its own thread": it uses whichever thread is current at the time we enter MPS. > At least on Windows, I clearly see new threads starting when MPS > starts GC. You mean MPS calls CreateThread? GC creates no threads on GNU/Linux. >> On >> macOS, the GC can run on the main thread (allocation) or on the SIGSEGV >> handler thread (memory barriers); in both cases, the main thread has to >> wait for it to complete. >> >> I'm not sure it's ever useful to make the assumption that GC isn't >> concurrent: it is very hard to do so, but it is possible. >> >> Maybe Eli knows more; I posted a patch to force concurrent GC for >> debugging a while ago, and Eli told me not to because it would produce >> false positives. I'm not so sure about the "false" part now. > > I just conveyed what a comment in igc.c says (or used to say back in > May). Sounds like I misunderstood, then. If we all agree that Emacs shouldn't assume GC non-concurrency, triggering GC eagerly from another thread is a useful thing we should test (after making dflt_pad poison memory, ideally). Pip