重看ulk block部分的内容,觉得总结generic block layer 的这段比较有意思:
The generic block layer is a kernel component that handles the requests for all block devices in the system. Thanks to its functions, the kernel may easily:
Put data buffers in high memorythe page frame(s) will be mapped in the kernel linear address space only when the CPU must access the data, and will be unmapped right after.
》》 High MEM map 用完就释放。毕竟很宝贵~ 896~1024中间被4kb隔开的vmalloc单元。
说到这里的buffer了,有一个问题需要结合上面的memory map 继续去看看。
1. raw buffer. 用 dd 拷贝的 blocks 在ram里面有buffer对应。 这个buffer,是raw的,简单的与hd的对应。
2. file's view。 如果文件也用的了这些 block,是否重用这些buffer呢? 记得之前和聂林讨论过,需要在看一遍确认。
Implementwith some additional efforta "zero-copy" schema, where disk data is directly put in the User Mode address space without being copied to kernel memory first; essentially, the buffer used by the kernel for the I/O transfer lies in a page frame mapped in the User Mode linear address space of a process.
Manage logical volumessuch as those used by LVM (the Logical Volume Manager) and RAID (Redundant Array of Inexpensive Disks): several disk partitions, even on different block devices, can be seen as a single partition.
Exploit the advanced features of the most recent disk controllers, such as large onboard disk caches , enhanced DMA capabilities, onboard scheduling of the I/O transfer requests, and so on.
》》 今天要看一下io scheduler,明天看 cgroup 里面对io bandwidth 的支持
阅读(1908) | 评论(0) | 转发(0) |