tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: UBC and page replacement

On Mon, Mar 08, 2010 at 11:08:59PM +0000, Sad Clouds wrote:
> Hi, I've sent a similar message to netbsd-users@ list, but didn't get
> any responses, maybe somebody on tech-kern@ knows the answer?
> I've been looking at the following paper:
> "UBC: An Efficient Unified I/O and Memory Caching Subsystem for NetBSD"
> However I'm not clear about what strategy NetBSD uses for page
> replacements. For example, a web server does mainly read operations
> from filesystem, so the kernel will eventually fill up buffer cache.
> When the buffer cache is full and there is no free RAM, the kernel
> would need to replace some of the pages. How does it decide what pages
> to replace? Does it look at the usage pattern or the underlying file
> size? Does it try to steal pages from a single large (say 2GB) file,
> rather than stealing them from many small files?

I think it uses a simple LRU scheme, but that would need to be confirmed
from sources (or someone knowning the details :)

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference

Home | Main Index | Thread Index | Old Index