shrinking memory consumptions

Ivan Krstić krstic at solarsail.hcs.harvard.edu
Mon Apr 2 14:48:32 EDT 2007


Jim Gettys wrote:
> 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.

No -- I explicitly said I'm proposing a non-polling, non-blocking
notification mechanism that's _orthogonal_ to the existing OOM killer
functionality. There's no deadlock hell here. You're calling the same
thing a 'hint'. We're in violent agreement.

Fundamentally, this is a user experience issue. Applications
disappearing without any explanation, and for reasons completely
unrelated to user actions (such as running low on memory) clearly isn't
the user experience we want to provide. A userland application quit
chooser, driven by a low-memory hint from the kernel and with a sane
default application preselected for quitting -- chosen by some of the
heuristics you mention -- is pretty obviously superior from a user
experience point of view. And if the user takes too long to answer or
the remaining memory dries up because something is allocating it very
quickly, well, let the OOM killer go to town.

-- 
Ivan Krstić <krstic at solarsail.hcs.harvard.edu> | GPG: 0x147C722D



More information about the Devel mailing list