[lkml]   [2006]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] kernel facilities for cache prefetching
On Tue, May 02, 2006 at 10:09:36AM +0200, Jens Axboe wrote:
> Your patch isn't exactly pretty, but that is fixable. I'm more
> interested in how you'd control that sanely.

I have a quick and dirty hack called BootCache (only afterwards did I notice
that Apple used the same name) that snoops all the read requests during
startup and uses that to populate a file which gets read in to populate
the cache on subsequent boots. The results are impressive: eliminating
the seeks (since the file is contiguous) results in 15s (out of the 45s
from init starting to the login prompt) reduction in boot time on ext3.

Prefetch without reordering isn't particularly effective, as the cost of
the seeks to read in the inodes and file data tend to block critical path
io in the startup scripts.

I hope to release the code sometime soon and rework it to be a better fit
for merging with the kernel -- it should be possible to use the block io
tracing facility to log the blocks required and then feed that back into
the filesystem to reallocate blocks in the filesystem. That would eliminate
the messy part of bootcache that has to snoop block writes to maintain the
cache. This is all part of what I'm aiming to present at OLS.

"Time is of no importance, Mr. President, only life is important."
Don't Email: <>.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-05-04 00:08    [W:0.092 / U:10.304 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site