lkml.org 
[lkml]   [2003]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Mem: and Swap: lines in /proc/meminfo
On Thu, 11 Dec 2003, Mike Fedyk wrote:

> > Note that the inactive clean pages count (more or less)
> > as free pages, too.
>
> But I should count it as "Inactive" right?

Yeah.

> So, if it's clean, then the page has already been zeroed out, and is
> ready to be used but just needs some flags updated? Or they contain
> possibly useful data, and just are not dirty?

The latter.

> So a page that is inactive, but not dirty will go directly in that
> list?

No, LRU ordering is preserved. The inactive clean list is just the
last stage before the page really gets freed.

> What can happen to Inact_clean pages besides being freed, and used on
> the free memory list?

The data that's still in the page could be referenced again, in which
case the page gets moved to the inactive dirty list and from there on
to the active list.

In effect, the inactive clean list is a "soft free" list, which means
we can keep a larger number of pages almost-free, without wasting
memory.


--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

-
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: 2005-03-22 13:59    [W:0.072 / U:7.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site