From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: Collecting markers with MPS Date: Wed, 24 Apr 2024 10:56:27 +0200 Message-ID: <874jbrjg04.fsf@gmail.com> References: <87cyqfjk6n.fsf@gmail.com> <86sezb2oj2.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="18583"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: gerd.moellmann@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Apr 24 10:57:30 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 1rzYRW-0004fp-4e for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Apr 2024 10:57:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzYQc-0002Ra-P5; Wed, 24 Apr 2024 04:56:34 -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 1rzYQa-0002Q6-P9 for emacs-devel@gnu.org; Wed, 24 Apr 2024 04:56:32 -0400 Original-Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rzYQZ-0005KZ-0G; Wed, 24 Apr 2024 04:56:32 -0400 Original-Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-41a442c9dcbso25795775e9.2; Wed, 24 Apr 2024 01:56:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713948989; x=1714553789; 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=VLPOEjLzLKtE2eBXDrjHSQZ65FJzA0VSeolaATkClJM=; b=cF0YfVyEy/Ez9/NEPce1Cr6faRH+ZQ1qnu90BDfcNiNJ71TPWSS9/QVucACQfPVcpp gajLoJ8VFCVhOBOZYzTOj3Qr3/xRV6KLiRD9/KVAW+8Ul/XKJX5CFPnOFfgYzFz40IWg uSf378WA92m7+vtNYSqO4Sevf8BhTEbpBJQrousS5WWi+OxkFWHNFyvOb8DwfAnuFQip SU9uM+30ojTUnLCBZ3nT64RwphMXlsi9OWNg2o6naQZt6D9yqyB9JH8VAjiU9Fkhg4fx rLP0CSWVvqb9TgGuB9xGT4us7TOwGQH2/z5a5FEPQAYQJLZpKwzSR/ex78IS7oSnzz7O Wjmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713948989; x=1714553789; 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=VLPOEjLzLKtE2eBXDrjHSQZ65FJzA0VSeolaATkClJM=; b=vYJv+KzLl9ydoavLJtPwvafmS9K/RM92n2N+sZKXzUtrxwA+vbpzK0KwW18XTr5QM5 IuERYaorDDrT29113GhKXpRMr6rNfNI5LVPnO10iB+s38gjMKyHWLLmw2CABiHOx2I1t P6jed9p9sdD1ZjtmNmU9TSYm+gFkTYbAjTr42YM2HERwCmuGchZSg3lMQnuzISlWucL/ PIXhB9JMISa0sK1s5IEMUEw54DQkN2DA9c0yyIbGW+4h6zqFZrLTtc/sK148msFLYz+y U8qeE0duAnTqMQEpASr7grQ53/SHwJ/trK0RvRriCLTblYb/CEAEluOttDgpuxUBOYx8 nzHQ== X-Forwarded-Encrypted: i=1; AJvYcCVDKdURhm7fQgpdXEG0qS8ttHP6C6Ly+rsD7k5XPSSGVbazuaS272QO8tgaqserwyva3kQINMuHVRYfoJl5gs7M+UGD X-Gm-Message-State: AOJu0Yz/qxJJZjuopehy2fKfL1KY5UVwhzhwDsupkpcFhh83/91PL4GZ ThI3F5UM/T6mENwBcfMl+MLdibu8h43RN1PVsJ7JA1rxnCIqodRCaYkaww== X-Google-Smtp-Source: AGHT+IEqEnLNTFC9cxzdkWAFE6FzgoecikbF0Ezxib3sRyV/B9ATsDupHKqkNkbiZysLYrqDrfDxBg== X-Received: by 2002:a05:600c:1e8d:b0:41b:4db:5076 with SMTP id be13-20020a05600c1e8d00b0041b04db5076mr602868wmb.7.1713948988495; Wed, 24 Apr 2024 01:56:28 -0700 (PDT) Original-Received: from caladan ([89.107.106.118]) by smtp.gmail.com with ESMTPSA id u17-20020a05600c19d100b00416b163e52bsm26667694wmq.14.2024.04.24.01.56.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 01:56:28 -0700 (PDT) In-Reply-To: <86sezb2oj2.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 24 Apr 2024 10:44:17 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=eller.helmut@gmail.com; helo=mail-wm1-x330.google.com 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_DNSWL_NONE=-0.0001, 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:318021 Archived-At: On Wed, Apr 24 2024, Eli Zaretskii wrote: [...] >> What do you think? Is there an more elegant alternative? > > My opinions here mean very little for now, as I don't yet have a good > view of the issues, but in general: why do we have to do everything > the old GC did in the new GC? And I was hoping you would say: "We don't need to collect markers. It's a nicety that was easy to do in the old GC. If it's not easy in the new GC, leave it out". > Can't we leave some of the stuff to be > done in the main thread? For example, the old GC would compact buffer > text, Lisp strings, and font caches -- this cannot be done from a > different thread, AFAIU. Why not keep doing this from the main > thread, like we do now? They are not really directly relevant to GC, > just some housekeeping tasks that need to be done from time to time. How would the main thread know that a marker is not referenced from anywhere else than from the undo-list? Are you saying the main thread should still do some marking as the old GC did, so that it can make the decisions on the same mark bits? > Yes, it would mean the main thread still needs to stop from time to > time, but for much shorter periods of time. And it will allow us to > sidestep the significant changes like those mentioned above, some of > which would mean Lisp-level changes that will affect Lisp programs. > > If leaving some of this stuff in the main thread is reasonable, we > could add the above two jobs to that part, which would allow us to > leave the existing related code almost intact. > > Does this make sense? I think, moving some things from the old GC code to timers certainly would make sense. But for the marker issue in particular, I don't see how it could be done without help from the GC. Helmut