shrinking memory consumptions

Jim Gettys jg at laptop.org
Mon Apr 2 14:32:10 EDT 2007


On Mon, 2007-04-02 at 14:12 -0400, Ivan Krstić wrote:
> Jim Gettys wrote:
> > Having apps save themselves periodically so they can be transparently
> > restarted is I think the right goal.
> 
> Agreed, but that's another mechanism that should be completely
> orthogonal to the OOM killer.
> 
> > Sorry: that's not the way the kernel works; for example, in can come
> > packets, and you can't wait on user space to do anything. 
> 
> Huh? Can you rephrase? There is no way that adding a notification
> mechanism orthogonal to the OOM killer can regress the existing
> functionality, so you're either thinking about the problem incorrectly
> or not understanding what I'm proposing. If it's the latter, I can try
> to clarify more.
> 

Oh, I understand all right.  And ran it by those who really understand
the Linux kernel.  You end up in all sorts of deadlock hell if you try
to rely on user space for anything; at most you can hint to user space
that memory is getting low.

The kernel fundamentally always needs to be able to allocate memory; and
the very notification of a process will require more memory to be
allocated.

The Sigdanger is about the best you can do (hinting when memory is
getting low), along with making sure that the right things get killed
and make sure things can run amok.
                                        - Jim

-- 
Jim Gettys
One Laptop Per Child





More information about the Devel mailing list