lkml.org 
[lkml]   [2004]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Request: I/O request recording
Bart Samwel <bart@samwel.tk> wrote:
>
> When I saw this thread I've fiddled for a bit with the block_dump
> functionality that's in the laptop_mode patch. I wanted to see if it
> could support a similar thing completely from user space (except for the
> block_dump code, of course). I've written a small tool to generate a
> complete file that lists tuples (sector, size, device) from the kernel
> output in syslog; it parses all "READ block xxx" messages since the
> last reboot. Putting this through sort -n -u delivers a nicely sorted
> file, ready for optimized reading.
>
> Unfortunately I'm now stuck within the other part, which is reading the
> pages back in memory at the next boot. It's not working, and I was
> hoping someone here could take a look and tell me what I'm doing wrong.

Linux caches disk data on a per-file basis. So if you preload pagecache
via the /dev/hda1 "file", that is of no benefit to the /etc/passwd file.
Each one has its own unique pagecache. When reading pages for /etc/passwd
we don't go looking for the same disk blocks in the cache of /dev/hda1.

Which is why the userspace cache preloading needs to know the pathnames of
all the relevant files - it needs to open and read each one, applying
knowledge of disk layout while doing it.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.055 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site