Subject: Re: Do some disk accesses miss the UVM?
To: Perry E. Metzger <perry@wasabisystems.com>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: tech-kern
Date: 01/25/2002 08:53:28
On Fri, Jan 25, 2002 at 12:12:57AM -0500, Perry E. Metzger wrote:

 > Well, the need is that it would be good for us to be able to do two
 > find(1)s of a large tree and have the disk only spin on the first
 > one. If you have the RAM, it is far less costly to cache all that
 > data. This is of great practical importance at times for performance.

So, while I agree this would be nice, stop to consider that if you
also plop file metadata into the page cache:

	(1) You now have 3 policy knobs to futz with when picking
	    a page to evict: anon, file data, filesystem metadata.

	(2) You have to decide where the metadata pages will live,
	    i.e. which VM object they'll be associated with.  For
	    directories, this is mostly easy, since directories
	    have vnodes.  But for other types of metadata (inodes,
	    superblocks, cylinder groups, etc.), you have to pick
	    another vnode to associate them with.  That would probably
	    be the vnode for the underlying device.

	(3) To make (2) work, you probably have to UBC'ify all block
	    device access.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>