GNU bug report logs -
#37006
27.0.50; garbage collection not happening after 26de2d42
Previous Next
Reported by: Joseph Mingrone <jrm <at> ftfl.ca>
Date: Sun, 11 Aug 2019 12:41:01 UTC
Severity: normal
Tags: patch
Found in version 27.0.50
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Mattias EngdegÄrd <mattiase <at> acm.org>
> Date: Tue, 13 Aug 2019 18:48:05 +0200
> Cc: jrm <at> ftfl.ca, eggert <at> cs.ucla.edu, 37006 <at> debbugs.gnu.org
>
> > Yes, but the full calculation of the threshold is more complicated
> > than that. For starters, how do you handle gc_cons_threshold values
> > that are smaller than GC_DEFAULT_THRESHOLD / 10 under your proposal?
> > There are use cases where the value was below that before and is above
> > now, or the other way around, or was below and stays below.
>
> If a change to gc_cons_threshold has us end up in garbage_collect too soon, we can just adjust the bias and consing_until_gc and continue; the cost for doing so is small and amortised. Conversely, if the user raises gc_cons_threshold beyond the limit (OBJECT_CT_MAX), the intention is clearly to inhibit GC anyway.
>
> > And that's even before we consider other complications: when
> > memory-full is non-nil, we should use a different threshold; and what
> > about user changes to gc-cons-percentage?
>
> The check for memory-full was already eliminated from maybe_gc by changing consing_until_gc when that condition occurs, which seems reasonable enough. Regarding changes gc-cons-percentage, the effect will just be delayed to next GC --- is this really harmful?
IOW, you think that whatever this changes in user-facing behavior is
unimportant, and we shouldn't be bothered about it. I happen to
disagree.
> I could be wrong about all this; I'm a bit confused by the threshold computation, too. However, Paul's consolidation of conditions in the hot and inlined maybe_gc makes eminently sense to me.
I cannot say the same thing myself, sorry. Making a frequent
operation faster definitely makes sense, even if the speedup is minor.
But doing that and as result breaking use cases that worked for years,
or even just changing their effects in a tangible manner? what's our
excuse for that?
This bug report was last modified 5 years and 246 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.