Subject: Re: UBC status
To: Chuck Silvers <>
From: Eduardo E. Horvath <>
List: tech-kern
Date: 10/01/1999 09:22:47
On Thu, 30 Sep 1999, Chuck Silvers wrote:

> a page being on the inactive list implies that it has no pmap mappings,
> which isn't really want you want for cached regular file data.  or by
> "buffer-cache pages" do you mean just metadata, which is all that will
> be in the buffer cache in the post-UBC world?

I was mostly thinking about the data pages.  What would those pages be
mapped into?  The way file I/Os currently work is that a page is read into
the buffer cache and then the requested section of data (probably not page
aligned) is copied in/out of the requesting process' data space.  Has that
changed with UBC?

I would expect you still want to do the copy and map both the destination
and target into the kernel for simplicity.  But once the copy is complete
there is no reason to leave the page mapped in.  In fact, it would be best
to unmap it immediately and put it on the inactive list at that point.
Otherwise you rely on the page scanner, which will not distinguish between
buffer cache pages and process pages.

> furthermore, the inactive list wants to contain at most 1/3 of RAM,
> but we'd like to allow using nearly all of RAM for cached file data
> in the case where the demand for other types of pages is low.

You want "to allow using nearly all of RAM for cached file data" only in
the case where there is no other good use for that RAM.  The problem seen
in the past with unified buffer caches is that heavy use of the buffer
cache will cause sleeping processes to be paged or swapped out.  Then
these processes take a long time to fault their working sets back in.
This causes significant performance problems, especially on interactive
systems.  Consider what happens if you run a `find' command to hunt for
some file on the machine which causes your browser and your X server and
your window manager get paged out and replaced with filesystem data.  You
really don't want this to happen.

Eduardo Horvath
	"I need to find a pithy new quote." -- me