[lkml]   [2000]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: Avoiding OOM on overcommit...?

> 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.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:57    [W:0.085 / U:0.088 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site