• Alan Cox's avatar
    [PATCH] Root reservations for strict overcommit · 157ac241
    Alan Cox authored
    This was on my TODO list for a while and it turns out someone already fixed
    the armwaving overcommit mode for the same problem.  It is easy to get into
    a situation where you have no overcommit and nothing can be done because
    there is no memory to clean up the stable but non-useful state of the
    machine.
    
    The fix is trivial and duplicated from the armwaving overcommit code path. 
    The last 3% of the memory can be claimed by root processes only.  It isn't
    a cure but it does seem to solve the real world problems - at least
    providing you have enough memory for 3% to be useful 8).
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    157ac241
commoncap.c 10.5 KB