Re: IOCache vs. block cache
Rene Gollent <[email protected]> Thu, 17 Jun 2010 21:49:23 -0400
| Newsgroups | gmane.os.openbeos.kernel.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jun 17, 2010 at 8:03 PM, Simon Taylor <simontaylor1-XZoyATsUNX5Wk0Htik3J/[email protected]> wrote: > I'm still confused about the difference between the file and block > cache, or more specifically why the file cache offers an advantage over > the block cache which is presumably a lower-level abstraction. The file cache is aware of the file at a higher level, which enables it to do things like intelligent prefetching. I.e. if you ask for a particular block of a file, it stands to reason that you'll very likely be requesting the next few in short order, and so the file cache can ask the FS to read more blocks into mem than you actually asked for (since, if the blocks are sequential you can more or less get a ton of them "for free" from the same read), so that the next request won't incur a disk read. The block cache can't do that since it has no idea of the logical layout of the file or FS metadata. Regards, Rene ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo