From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: MPS: out-of-memory Date: Mon, 08 Jul 2024 19:31:56 +0000 Message-ID: <15m5ZGbG7pRv2ovoHghj1z9uN07Gp1_OcvMtcHAUv2qNvdx7D1tJ5o2UAEsFqUHVBdFZYq3XtpDs1qGXUn-xOIp3V08oCPEV0xMUI9DZGY0=@protonmail.com> References: <87msmu1uy5.fsf@gmail.com> <865xtg14hd.fsf@gnu.org> <87o777wxh4.fsf@gmail.com> 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="7286"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?Q?Gerd_M=C3=B6llmann?= , Eli Zaretskii , acorallo@gnu.org, emacs-devel@gnu.org To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 09 04:21:44 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 1sR0UC-0001ix-K7 for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Jul 2024 04:21:44 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sR0Tf-00082Z-PE; Mon, 08 Jul 2024 22:21:11 -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 1sQu5n-0007DW-BS for emacs-devel@gnu.org; Mon, 08 Jul 2024 15:32:07 -0400 Original-Received: from mail-4322.protonmail.ch ([185.70.43.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sQu5k-0004tw-KG; Mon, 08 Jul 2024 15:32:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1720467121; x=1720726321; bh=aA2Xs1lUtTF6HpFWHzMaup/bOZ+swIpgy+T366+858U=; 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; b=cc3BT+3pS+5eDB+oLvYAm+bpKWTx2smI3ch2ECOX+07Lx8HGesXx93NWpWzMUz105 Yqz5qk819hQOZLbCMXQPpA/PpXr5PRLPjaf+C3oMpX9nGyxJaP9X7Jm9kItburLgGn kIloSnEv3NROb+L9Znc6MJCKK9ZIoRkatvkCnrUCmf+RYwxmODVzJkPGjzmHfaOfFf yw3BCzkg+Ys+Xq/ryHQQw3zB7yJfuSFbG28VlR6Vsa77jnEpVPiPbnPFrBZrFzy3VE gzrsVeM7/V9fhjFsRaMN/Ag/yz+PfRNMg5V7HfQ9R+ue7w46LXIKPQPlY2tMmnJbkj za9k0Y//fw4HQ== In-Reply-To: <87o777wxh4.fsf@gmail.com> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 442ce3beb510919d6fa16459c0f56f84ed1b1d5c Received-SPF: pass client-ip=185.70.43.22; envelope-from=pipcet@protonmail.com; helo=mail-4322.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_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=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: Mon, 08 Jul 2024 22:21:09 -0400 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:321552 Archived-At: On Monday, July 8th, 2024 at 18:27, Helmut Eller w= rote: > On Mon, Jul 08 2024, Pip Cet wrote: >=20 > > If I understood Helmut correctly, he wants a mechanism to avoid > > thrashing after exceeding the memory limit. Maybe we need a special > > state for that, in which we stop the GC but continue using our memory > > while the user quits and goes to buy more RAM? >=20 > Mabye there could be a hard and a soft limit. When the soft limit > is reached, Emacs could ask something like >=20 > There's little free memory left. Continue? >=20 > and when the hard limit is reached, it would simply abort. I'm not sure I see the point of having two separate limits, but user prefer= ences differ; in my case, I think it would be sufficient to stop MPS garbag= e collection with a message once a limit is reached, and resume it only aft= er manual intervention. However, that's definitely a new feature rather tha= n an existing Emacs feature we have to support... > > Speaking of memory issues in general, I'm currently seeing pure space > > overflows, after changes which should affect weak objects > > exclusively. Which is really odd, because weak objects aren't > > purecopied! Still investigating that one, but it's possible I'll just > > give up and bump pure space. >=20 > There's a purecopy_hash_table. Unless I messed up, it shouldn't actually purecopy weak hash tables, though= . In any case, a "make bootstrap" "fixed" the problem, so I'm not sure what= went wrong... I've installed a change to die on pure space overflow if we have MPS; there= 's no way to tell which objects still have headers, at that point. Pip