linux - I/O Storage Stack

引用




一. Linux Storage Stack

Linux Storage Stack Diagram

  • VFS: 虚拟文件系统层。由于内核要跟多种文件系统打交道,而每一种文件系统所实现的数据结构和相关方法都可能不尽相同,所以,内核抽象了这一层,专门用来适配各种文件系统,并对外提供统一操作接口。
  • xxx FS: 不同的文件系统实现自己的操作过程,提供自己特有的特征,具体不多说了,大家愿意的话自己去看代码即可。
  • Page cache: 对page的缓存
  • Block Layer: 由于绝大多数情况的io操作是跟块设备打交道,所以Linux在此提供了一个类似vfs层的块设备操作抽象层。下层对接各种不同属性的块设备,对上提供统一的Block IO请求标准。
  • I/O scheduler: 因为绝大多数的块设备都是类似磁盘这样的设备,所以有必要根据这类设备的特点以及应用的不同特点来设置一些不同的调度算法和队列。以便在不同的应用环境下有针对性的提高磁盘的读写效率,这里就是大名鼎鼎的Linux电梯所起作用的地方。针对机械硬盘的各种调度方法就是在这实现的。
  • device driver layer: request函数对请求队列中每个bio进行分别处理,根据bio中的信息向磁盘控制器发送命令。处理完成后,调用完成函数end_bio以通知上层完成。

简化图:

linux块设备IO栈浅析

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
CMake Error at /home/sniper/anaconda3/envs/yolov8/lib/python3.8/site-packages/cmake/data/share/cmake-3.25/Modules/CMakeTestCCompiler.cmake:70 (message): The C compiler "/usr/bin/gcc" is not able to compile a simple test program. It fails with the following output: Change Dir: /opt/projects/tensorrt-alpha/yolov8/build/CMakeFiles/CMakeScratch/TryCompile-TrXrKM Run Build Command(s):/usr/bin/make -f Makefile cmTC_7d457/fast && /usr/bin/make -f CMakeFiles/cmTC_7d457.dir/build.make CMakeFiles/cmTC_7d457.dir/build make[1]: 进入目录“/opt/projects/tensorrt-alpha/yolov8/build/CMakeFiles/CMakeScratch/TryCompile-TrXrKM” Building C object CMakeFiles/cmTC_7d457.dir/testCCompiler.c.o /usr/bin/gcc --sysroot=/usr/ -march=x86-64 -o CMakeFiles/cmTC_7d457.dir/testCCompiler.c.o -c /opt/projects/tensorrt-alpha/yolov8/build/CMakeFiles/CMakeScratch/TryCompile-TrXrKM/testCCompiler.c Linking C executable cmTC_7d457 /home/sniper/anaconda3/envs/yolov8/lib/python3.8/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7d457.dir/link.txt --verbose=1 /usr/bin/gcc --sysroot=/usr/ -march=x86-64 -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/home/sniper/anaconda3/lib -Wl,-rpath-link,/home/sniper/anaconda3/lib -L/home/sniper/anaconda3/lib CMakeFiles/cmTC_7d457.dir/testCCompiler.c.o -o cmTC_7d457 /usr/bin/ld: 找不到 /lib/x86_64-linux-gnu/libc.so.6 于 /usr/ 内部 /usr/bin/ld: 找不到 /usr/lib/x86_64-linux-gnu/libc_nonshared.a 于 /usr/ 内部 /usr/bin/ld: 找不到 /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 于 /usr/ 内部 collect2: error: ld returned 1 exit status make[1]: *** [CMakeFiles/cmTC_7d457.dir/build.make:99:cmTC_7d457] 错误 1 make[1]: 离开目录“/opt/projects/tensorrt-alpha/yolov8/build/CMakeFiles/CMakeScratch/TryCompile-TrXrKM” make: *** [Makefile:127:cmTC_7d457/fast] 错误 2 CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:25 (PROJECT) -- Configuring incomplete, errors occurred!
最新发布
06-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值