Welcome to the Linux Foundation Forum!

Self-Optimizing Hard Drives: Advice?

Options

Hello, I am a computer engineering student studying Linux kernel development. My 4-man team was tasked to propose a kernel development project (to be implemented in 6 weeks), and we came up with a tentative "Self-Optimizing Hard Disk Drive Linux Kernel Module". I'm not sure if that title makes sense to the pros.

We based the proposal on this project: http://www.cc.gatech.edu/~sburnett/download/borg.pdf

The goal of the project is to minimize hard disk access times. The plan is to create a special partition where the "most commonly used" files are to be placed. An LKM will profile, analyze, plan, and redirect I/O operations to the hard disk. This LKM should primarily be able to predict and redirect all file access (on files with sizes of < 10 MB) with minimal overhead, and lessen average read/write access times to the hard disk. I believe Apple's HFS has this feature.

Can anybody suggest a starting point? I recently found a way to redirect I/O operations by intercepting system calls (by hijacking all the read/write ones). However, I'm not convinced that this is the best way to go. Is there a way to write a driver that redirects these read/write operations? Can we perhaps tap into the read/write cache to achieve the same effect?

Any feedback at all is appreciated.

Sample system call hijack code:

http://memset.wordpress.com/2011/01/20/syscall-hijacking-dynamically-obtain-syscall-table-address-kernel-2-6-x/

Comments

  • Goineasy9
    Goineasy9 Posts: 1,114
    Options
    I'm sorry that you still haven't received a reply, although what your asking is above the heads of most of us here. There are experts that visit though, so, if you're patient, you might actually come up with some good answers.
    My only experience with something on this line was in the early days of pc's when we would gulp large parts of files into computer memory, work on the data, them push the info back. This has nothing to do with intercepting system I/O calls in Linux kernels, it was using already existing IRQ's within DOS.
    To my knowledge HD I/O is already fairly well optimized, so, if you come across something interesting, please let us know. Until that time, be patient, and maybe someone can actually help you here. Interesting assignment.
  • woboyle
    woboyle Posts: 501
    Options
    As you may have expected, there is more than one way around this barn. You can, as you are trying to do, intercept system write calls (dangerous side effects), or you can modify the appropriate file system driver code to vector out to your own code when appropriate data is received. If performing the latter, then you will probably want to use the ext2 file system driver for this project (it is the root for ext3 and ext4 as well, so should work for all of those).

Categories

Upcoming Training