GNU bug report logs - #79346
igc: PolicyShouldCollectWorld

Previous Next

Package: emacs;

Reported by: Helmut Eller <eller.helmut <at> gmail.com>

Date: Sat, 30 Aug 2025 11:55:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Helmut Eller <eller.helmut <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 79346 <at> debbugs.gnu.org
Subject: bug#79346: igc: PolicyShouldCollectWorld
Date: Fri, 05 Sep 2025 05:28:28 +0200
Helmut Eller <eller.helmut <at> gmail.com> writes:

> On Thu, Sep 04 2025, Gerd Möllmann wrote:
>
>> Helmut Eller <eller.helmut <at> gmail.com> writes:
> [...]
>>> What would you think of making mps_arena_step and perhaps buffer_step
>>> available from Lisp so that those things can be called from Lisp-level
>>> idle timers?
>>
>> Sounds like a good idea.
>
> Below is a patch that does this.

Thanks. I have that in my Emacs now.

> The idle timer waits 2 seconds, before it calls mps_arena_step.  As
> usual, "idle time" is the time since the last command completed, i.e. 2
> seconds must pass after a command before the idle timer fires.  (Other
> timers or process filters don't reset "idle time"; only new commands
> do.)  I think that should avoid the problem that I've seen where
> opportunistic GC was started while I was in the middle of typing
> something.

Okay.

> The code uses a constant to predict the idle time; maybe one could to
> something a bit more clever; not sure if that would be worth the
> trouble.

I'm already playing a bit with this

      (setq igc--step-interval 0.02 igc--idle-delay 1.0)

The step interval is what I've been using before, together with the
generations I mentioned. Don't know about the delay.

> Regarding bug#76505 (or https://github.com/Ravenbrook/mps/issues/305),
> I now think that it's safe to call mps_arena_step with multiplier=0:
> The expression (availableEnd - now) never overflows because the
> invariant now <= intervalEnd <= availableEnd holds.

Hadn't noticed that one, and it's a bit tldr. Maybe it's worth adding
something to the MPS issue? Or maybe not, don't know.




This bug report was last modified today.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.