用于自我优化硬盘的Linux内核模块:建议? [英] A Linux Kernel Module for Self-Optimizing Hard Drives: Advice?
问题描述
我是一名计算机工程专业的学生,正在研究Linux内核开发.我的4人小组的任务是提出一个内核开发项目(计划在6周内实施),我们提出了一个暂定的自我优化硬盘Linux内核模块".我不确定该称谓对专业人士是否有意义.
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.
我们基于该项目的提案.
该项目的目标是最大程度地减少硬盘访问时间.计划是创建一个特殊的分区,在该分区中放置最常用"的文件. LKM将分析,分析,计划和重定向I/O操作到硬盘.该LKM应该主要能够以最小的开销预测和重定向所有文件访问(在大小小于10 MB的文件上),并减少对硬盘的平均读/写访问时间.我相信Apple的HFS具有此功能.
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.
有人可以建议一个起点吗?我最近发现了一种通过拦截系统调用来重定向I/O操作的方法(通过
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?
感谢任何反馈.
推荐答案
您可能需要看一下Unionfs.您甚至不需要LKM-只需一个用户空间守护程序即可订阅inotify事件,保留统计信息并在分区之间迁移文件. Unionfs会将两个分区合并为一个逻辑文件系统.
You may want to take a look at Unionfs. You don't even need a LKM - just a some user-space daemon which would subscribe to inotify events, keep statistics and migrate files between partitions. Unionfs will combine both partitions into a single logical filesystem.
这篇关于用于自我优化硬盘的Linux内核模块:建议?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!