From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: Some experience with the igc branch Date: Fri, 27 Dec 2024 17:18:08 +0100 Message-ID: References: <87o713wwsi.fsf@telefonica.net> <86zfkjznat.fsf@gnu.org> <86ldw2zy6s.fsf@gnu.org> <87h66p5fy6.fsf@protonmail.com> <86cyhdw3ey.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22944"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Pip Cet , 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 17:18:34 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 1tRD2o-0005hg-8x for ged-emacs-devel@m.gmane-mx.org; Fri, 27 Dec 2024 17:18:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRD2W-0001bo-Tz; Fri, 27 Dec 2024 11:18:16 -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 1tRD2V-0001bg-Am for emacs-devel@gnu.org; Fri, 27 Dec 2024 11:18:15 -0500 Original-Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tRD2T-0008H6-QB; Fri, 27 Dec 2024 11:18:15 -0500 Original-Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-aa69107179cso1222359466b.0; Fri, 27 Dec 2024 08:18:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735316291; x=1735921091; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=b+K69nkhfGPrJYwLwXBpEuRD7jQrAXNISDI5yRcx06Q=; b=mrtXr7DnmotEwtrL5PaaBnU2HceP9gkJ2+08DXy2/RL3t3/CWWqPdx7g6MOappvfMU QAjrudbT3JoiL+sv9itfh6uuv4AyprsvzdahNn1nnIl0VQSy3TpiAKkDFZm4Xp2Gt9f8 DUnHrYioRPr2Nbf7hbYrZYCVGZv5Z9L8FAVRjnvSn/cLep8WpZE9d0CRcERzPj2aidIy JnllafmgKtchw5CM+qFe8ko/yRd8NF8Juk93fthok3LpSsAU9j1XDMduNeKCmxGcFk5r kuFaVDC24H003QdjmwyKq7/68kzfqKlmxLzxbiAjppTmTO37NvFkBL6QbZunvFBuHgiH fyJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735316291; x=1735921091; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=b+K69nkhfGPrJYwLwXBpEuRD7jQrAXNISDI5yRcx06Q=; b=TPLnSfh/DS3GF2JHC49JUblA4t+KRDFANB3nEwCrUJi3rN7mef5hw6Oa4A3G4oO13q vk8dRWpVrzZvIQDBGLsB+Lj/9rCTOOHrtZhh29FLw4lJV2n2phph0fTIe2xrUJJODMzf psMKzimgOzOncpr0PzWzc3H6T68M+4H6rUkjIWLbT6d8hsepSlM4VmaUXFI+69rOP85E ObLIwTJTQCuwXUdwnQ/qh45xLw7iK9YUAWdJp+PlUBR9OXLVNYa0+7mNDqcx4VPHF3+e czoeevX5RS5hlDglirQ1qeckeJaPaYw3lQYUxjAFrs+wwxuQP+RXFZKTsDWqnX5spjaC jpqQ== X-Forwarded-Encrypted: i=1; AJvYcCVftAkKmx62NJiX37YLC24LxYsfnMyj0B1c5BZwEtJIsT7TbJZ0xZAUwcYf62GM+CK0msIvcZHN/+KZISU=@gnu.org, AJvYcCVlwAaFPgd1ea6oKN+ED4+AAsCUU1/teYVS+gJgbaLMnI83NuP/xdvG2yHYQb1MxahlqN6vngp3lw==@gnu.org X-Gm-Message-State: AOJu0YxrWM4kzbs224LdBCvL4A/K+lTQQiBFBi5wA4eET9bSwwAaIxUp HKEOaPMiCLfUWnZ9lCwWl4yJdG47i4UgtbSBH4GgnZi7MgQge+k0Ud4MQw== X-Gm-Gg: ASbGncsLDfKMsixTYMwIe/wQvqIvneiziSWTtaFxKgKNSJnzk1iPaA8FjK3U6QAMvxO Yv78s7YzlxyjnTD2DtmkBVWKXBSXHaSPs31n9ReUAcPqV79SqlpgEEy3b1jQL/ZKRSrecvzFaGK tSHXUVn8zeG68hJEem8sdGGhnw3jNPbDfDLdFq6ZYz9JpKzrVoFO2vEd63bKOfTfDqTWvtY/xMR h9/Sq7Ji6NnQCiabwcLQIZJTWsi4BxTua0n4VPTx47CQukLq3/7lxNCDhYwwrzINpSc+gRI/ADn jPPHEDA4dj9U9tpXs4xz4Plms+wKYSuVuoQg8NZYtCmGD1dwZUe9pUNibFNv X-Google-Smtp-Source: AGHT+IFf3Z063Z+DDcTW6vrU8TgbAu2JYahCHHKSIBmvI4MlAEK0yK/3tacaoXhz0HM3H1+FuUjK8w== X-Received: by 2002:a17:907:7e90:b0:aa6:98b4:ba4a with SMTP id a640c23a62f3a-aac270278c0mr1742968466b.8.1735316291175; Fri, 27 Dec 2024 08:18:11 -0800 (PST) Original-Received: from pro2 (p200300e0b74e5900bde19f98ca9a60df.dip0.t-ipconnect.de. [2003:e0:b74e:5900:bde1:9f98:ca9a:60df]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d80676f23bsm11280283a12.32.2024.12.27.08.18.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Dec 2024 08:18:10 -0800 (PST) In-Reply-To: <86cyhdw3ey.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 27 Dec 2024 17:28:53 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x62e.google.com 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:327217 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. > > At least on Windows, I clearly see new threads starting when MPS > starts GC. > >> 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). MPS is concurrent. One can tell MPS that one has a certain amount of time to spare, so it can do work then, which I think runs in the main thread. I do that when Emacs thinks it's idle. There is also the case when an allocation point runs out of memory, but I don't want to open that box at the moment. I personally believe that this is too special for igc.org. But others may think differently of course.