首页 技术 正文
技术 2022年11月11日
0 收藏 810 点赞 2,106 浏览 799 个字

Direct I/O概念:

Direct I/O is a way to avoid entire caching layer in the kernel and send the I/O directly to the disk.

想要使用direct io的模式,可以这样做:

Opens files with O_DIRECT flag.

Synchronous I/O概念:

Synchronous I/O is any I/O (system I/O with or without O_DIRECT, or stream I/O) performed to a file descriptor that was opened using the O_SYNC or O_DSYNC flags.

几个Flag的区别:

O_DIRECT  I/O operations performed against files opened with O_DIRECT bypass the kernel’s page cache, writing directly to the storage.
O_SYNC File data and all file metadata are written synchronously to disk.
O_DSYNC     Only file data and metadata needed to access the file data are written synchronously to disk. Metadata that is not required for retrieving the data of the file may not be written immediately.

参考资料

===============

What is direct I/O anyway?

http://www.alexonlinux.com/what-is-direct-io-anyway

Ensuring data reaches disk

https://lwn.net/Articles/457667/

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,086
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,561
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,410
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,183
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,820
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,903