lkml.org 
[lkml]   [2011]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: running of out memory => kernel crash
Thanks a lot Denys for your indepth response

 
// Naderan *Mahmood;


----- Original Message -----
From: Denys Vlasenko <vda.linux@googlemail.com>
To: Mahmood Naderan <nt_mahmood@yahoo.com>
Cc: David Rientjes <rientjes@google.com>; Randy Dunlap <rdunlap@xenotime.net>; ""linux-kernel@vger.kernel.org"" <linux-kernel@vger.kernel.org>; ""linux-mm@kvack.org"" <linux-mm@kvack.org>
Sent: Thursday, August 11, 2011 10:08 PM
Subject: Re: running of out memory => kernel crash

On Thursday 11 August 2011 17:13, Mahmood Naderan wrote:
> >What it can possibly do if there is no swap and therefore it
>
> >can't free memory by writing out RAM pages to swap?
>
>
> >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.


> >Thus the only option is to find some not recently used page
> > with read-only, file-backed content (usually some binary's
>
> >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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-08-17 10:53    [W:0.098 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site