Quest: I/O prefetching experiment

Tom M. Kroeger (tmk@cse.ucsc.edu)
05 May 1999 01:05:43 -0700


I am in the process of implementing an inter-file predictive
prefetching policy. It uses accesses to one file to cause the
prefetching of another file. (More details can be found at
http://csl.cse.ucsc.edu/projects/predictive-caching/ )

My eventual goal is to produce and test a modified ext2 filesystem
that has in each inode some information that indicates which
inodes are related to this one, and then uses this information
to pre-fetch those inodes and their data. Currently, I've
created a module that sends traces of open and exec events to
a device for reading and a user level deamon that reads these
events -- builds the relationship structures and attempts
to prefetch the inode and its data (through a gorry temporary hack in
open -- I modified sys_open to call prefetching if the file name
is of the format /#$=dev_numb#inode_numb).

Ideally I'd like to check if the files data is alread in either the
page or buffer, and if not set up an async I/O for the first 32 KB of this
file.

My questions:

1 - Where is the best place to prefetch the regular file data to,
the page cache and/or the buffer cache?

My impression is that for regular file data the I should use the page
cache, and for directory file data I should use the buffer cache.
I am see cases where regular file data is found in the buffer
cache but not in the page cache. How should this be happening
if all regular file data reads go to pages in the page cache?

2 - What is the best way to prefetch directory file information if I
know that a specific directory is about to be accessed?

-- 

tmk

----------------------------------------------------------------------- Tom M. Kroeger Pray for wind Graduate Student, UC Santa Cruz \ Pray for waves e-mail: tmk@cs.ucsc.edu |\ and Pray it's your day off! http://www.cse.ucsc.edu/~tmk |~\ (408) 459-4458 |__\ (408) 427-2001 home ,----+--

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