Re: Libs in memory response.

Mark H. Wood (mwood@iupui.edu)
Sat, 23 Jan 1999 13:03:21 -0500 (EST)


On Fri, 22 Jan 1999, David D.W. Downey wrote:
> Since I have had NUMEROUS requests for copies of the answer to my
> original question about libs not dropping out of memory, I am going to
> repost my question and the answers I recieved. Also, couriously, it
> seems that i am NOT the only one who has this "feature" problem ect
> ect.

To condense a bit:

It's slightly stupid to throw away information about currently-
unused data in memory, just so the kernel can sit on a pile of
unused pages. It's smarter to leave everything in place,
in case you want it again soon, and just mark the pages as being
in such a state that the kernel can turn them into free pages
anytime it needs some. This is less work even if you never touch
those buffer contents again.

You can think of it this way. The kernel has two free-page lists:
one list of pages with nothing interesting in them, and another of
pages containing stuff that might become interesting and could be
just handed over without any I/O. Looking at it this way, you
want the second list to be large and the first to be small. And
that's what the kernel tries to give you.

-- 
Mark H. Wood, Lead System Programmer   mwood@IUPUI.Edu
Innovation is only valuable if it improves one's life; otherwise it's
just one more silly change to cope with.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/