Thread (85 messages) 85 messages, 9 authors, 2007-08-20

Re: [PATCH 02/10] mm: system wide ALLOC_NO_WATERMARK

From: Christoph Lameter <hidden>
Date: 2007-08-06 20:19:56
Also in: lkml

On Mon, 6 Aug 2007, Matt Mackall wrote:
quoted
quoted
Because a block device may have deadlocked here, leaving the system 
unable to clean dirty memory, or unable to load executables over the 
network for example.
So this is a locking problem that has not been taken care of?
No.

It's very simple:

1) memory becomes full
We do have limits to avoid memory getting too full.
2) we try to free memory by paging or swapping
3) I/O requires a memory allocation which fails because memory is full
4) box dies because it's unable to dig itself out of OOM

Most I/O paths can deal with this by having a mempool for their I/O
needs. For network I/O, this turns out to be prohibitively hard due to
the complexity of the stack.
The common solution is to have a reserve (min_free_kbytes). The problem 
with the network stack seems to be that the amount of reserve needed 
cannot be predicted accurately.

The solution may be as simple as configuring the reserves right and 
avoid the unbounded memory allocations. That is possible if one 
would make sure that the network layer triggers reclaim once in a 
while.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help