RE: Avoiding OOM on overcommit...?

From: David Schwartz (davids@webmaster.com)
Date: Fri Mar 24 2000 - 18:00:23 EST

  • Next message: Alex Buell: "Re: [2.3.99pre3] NMIs and Makefiles"

    > On the other hand, I see several people, some of whom I know are
    > competent, defending the existing behaviour.
    >
    > Methinks not all those folk are clueless. More likely, I've missed
    > something basic here. Would someone please explain it?

            If RAM is full, the kernel cannot page anything in without paging something
    else out first. Now suppose a process that demand-loaded a shared library
    suddenly touches a chunk of that library it has never used before. In order
    to page in that piece of the library, the system must page something else
    out. If swap is full, it can't page out, so it can't page in. What do you
    suggest it does other than kill the process?

            What pattern of operations resulted in this problem is irrelevant. The case
    of a 'malloc' followed by later use of the memory is just one of many.
    Ensuring that the system could never ever get into such a situation would
    render the system unusable in many common configurations.

            There are many operations that require the system to consume more
    vm/swap -- COW, stack expansion, and so on. Not all of them provide the
    kernel a clean oppurtunity to return a 'NULL'. The system has to balance all
    of these requirements.

            DS

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Fri Mar 24 2000 - 18:38:17 EST