[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MPS: User GC customizations
From: |
Eli Zaretskii |
Subject: |
Re: MPS: User GC customizations |
Date: |
Thu, 04 Jul 2024 16:58:14 +0300 |
> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Cc: Pip Cet <pipcet@protonmail.com>, Eli Zaretskii <eliz@gnu.org>,
> emacs-devel@gnu.org, eller.helmut@gmail.com
> Date: Thu, 04 Jul 2024 14:51:16 +0200
>
> >> igc-step-interval is a variable defined in ‘C source code’.
> >>
> >> Its value is 0.1
> >>
> >> How much time is MPS allowed to spend in GC when Emacs is idle.
> >> The value is in seconds, and should be a non-negative number. It can
> >> be either an integer or a float. The default value is 0 which means .
> >> don’t do something when idle. Negative values and values that are not
> >> numbers
> >> are handled as if they were the default value.
> >>
> >> It's for interactive use.
> > [...]
> What this variable does is give MPS notice that the client is currently
> idle and it might be a good time to do some work.
Is that really what this variable does? My reading of the
documentation is that it tells MPS how soon to stop GC which it
started when Emacs was idle. IOW, it's not about _triggering_ GC,
it's about _ending_ it. And the reason, AFAIU, is to avoid making
Emacs responses slow because MPS started GC when it detected that
Emacs is idle.
If my interpretation is wrong, then the doc string definitely needs to
be amended, but I think what you say is also in contradiction with
what MPS documentation itself says:
‘interval’ is the time, in seconds, the MPS is permitted to take.
It must not be negative, but may be ‘0.0’.
[...]
mps_arena_step() allows the client program to make use
of idle time to do some garbage collection, for example when it is
waiting for interactive input. The MPS makes every effort to
return from this function within ‘interval’ seconds, but cannot
guarantee to do so, as it may need to call your own scanning code.
It uses ‘multiplier’ to decide whether to commence long-duration
operations that consume CPU (such as a full collection): it will
only start such an operation if it is expected to be completed
within ‘multiplier * interval’ seconds.
Did I misunderstand what this step means?
- Re: MPS: User GC customizations, (continued)
- Re: MPS: User GC customizations, Eli Zaretskii, 2024/07/04
- Re: MPS: User GC customizations, Gerd Möllmann, 2024/07/04
- Re: MPS: User GC customizations, Ihor Radchenko, 2024/07/04
- Re: MPS: User GC customizations, Pip Cet, 2024/07/04
- Re: MPS: User GC customizations, Gerd Möllmann, 2024/07/04
- Re: MPS: User GC customizations, Eli Zaretskii, 2024/07/04
- Re: MPS: User GC customizations, Ihor Radchenko, 2024/07/04
- Re: MPS: User GC customizations,
Eli Zaretskii <=
- Re: MPS: User GC customizations, Gerd Möllmann, 2024/07/04
- Re: MPS: User GC customizations, Eli Zaretskii, 2024/07/04
- Re: MPS: User GC customizations, Eli Zaretskii, 2024/07/04
- Re: MPS: User GC customizations, Pip Cet, 2024/07/04
- Re: MPS: User GC customizations, Eli Zaretskii, 2024/07/04
- Re: MPS: User GC customizations, Gerd Möllmann, 2024/07/04
- Re: MPS: User GC customizations, Eli Zaretskii, 2024/07/04
- Re: MPS: User GC customizations, Gerd Möllmann, 2024/07/04
- Re: MPS: User GC customizations, Eli Zaretskii, 2024/07/04
- Re: MPS: User GC customizations, Gerd Möllmann, 2024/07/04