Subject: Re: bug#54698: non-recursive GC marking [PATCH]

From: Po Lu <[email-masked]>
Date: Fri, 08 Apr 2022 13:49:18 +0800

Richard Stallman <[email-masked]> writes:

> Concretely, what is this "knob"?  Is it a per-process variable?  If
> so, we could make Emacs set it, with a Lisp function to specify the
> value.

It's a kernel parameter.  It's not per-process, it applies to the entire
system.  Emacs could set it, but it would typically not have sufficient
privileges to do so.

> What is the precise definition of "no more memory left"?

It's complicated.  I think in addition to checking for free pages, Linux
also tries to reclaim some cached data, and the inode cache, before
determining that there is really no memory left.

> The thrashing that I observed did not immediately kill any process.
> Rather, it continued for minutes before doing so.  So I don't think
> there was "no more memory left on the system", because if that had
> been the case, Linux would have known it immediately.

Yes, the OOM killer typically kicks in before there is really no memory
left.