Thread (18 messages) 18 messages, 7 authors, 2011-08-19

Re: running of out memory => kernel crash

From: Denys Vlasenko <hidden>
Date: 2011-08-11 17:38:32
Also in: lkml

On Thursday 11 August 2011 17:13, Mahmood Naderan wrote:
quoted
What it can possibly do if there is no swap and therefore it 
quoted
can't free memory by writing out RAM pages to swap?
quoted
the disk activity comes from constant paging in (reading)
of pages which contain code of running binaries.
Why the disk activity does not appear in the first scenario?
Because there is nowhere to write dirty pages in order to free
some RAM (since you have no swap) and reading in more stuff
from disk can't possibly help with freeing RAM.

(What kernel does in order to free RAM is it drops unmodified
file-backed pages, and doing _that_ doesn't require disk I/O).

Thus, no reading and no writing is necessary/possible.

quoted
Thus the only option is to find some not recently used page
with read-only, file-backed content (usually some binary's 
quoted
text page, but can be any read-only file mapping) and reuse it.
Why "killing" does not appear here? Why it try to "find some 

recently used page"?
Because killing is the last resort. As long as kernel can free
a page by dropping an unmodified file-backed page, it will do that.
When there is nothing more to drop, and still more free pages
are needed, _then_ kernel will start oom killing.

-- 
vda

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
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