找到答案了,还是wiki给力阿。
atime updates are by far the biggest IO performance deficiency that Linux has today. Getting rid of atime updates would give us more everyday Linux performance than all the pagecache speedups of the past 10 years, _combined_.
As of 2.6.30 (9 June 2009), Linux defaults to relatime,[3] so that it will not update atime on all file reads. The behavior offers sufficient performance for most purposes and should not break any significant applications. Extended discussion of filesystem performance preceded the decision.[4] Indeed, relatime by default was the first patch Linux applied following the 2.6.29 release. In initial patches relatime only updated atime if atime < mtime or atime < ctime;######经实验,正确。和光标移动无关(之前是恰好修改文件后进行了光标移动)######atime是最近访问时间。。。。顾名思义。。。你cat一下它就会变了。。。。。######cat 后,access time没有改变。######
引用来自“$_$”的答案
atime是最近访问时间。。。。顾名思义。。。你cat一下它就会变了。。。。。
你的机器上是变的吗?
这是我的结果:
chenqi@chenqi-OptiPlex-760:~/poky/bitbake$ stat AUTHORS File: `AUTHORS' Size: 365 Blocks: 8 IO Block: 4096 regular file Device: 803h/2051d Inode: 9439976 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 1000/ chenqi) Gid: ( 1000/ chenqi) Access: 2012-08-29 18:57:35.430069290 +0800 Modify: 2012-08-29 18:57:35.354069292 +0800 Change: 2012-08-29 18:57:35.354069292 +0800 Birth: - chenqi@chenqi-OptiPlex-760:~/poky/bitbake$ cat AUTHORS Tim Ansell Phil Blundell Seb Frankengul Holger Freyther Marcin Juszkiewicz Chris Larson Ulrich Luckas Mickey Lauer Richard Purdie Holger Schurig chenqi@chenqi-OptiPlex-760:~/poky/bitbake$ stat AUTHORS File: `AUTHORS' Size: 365 Blocks: 8 IO Block: 4096 regular file Device: 803h/2051d Inode: 9439976 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 1000/ chenqi) Gid: ( 1000/ chenqi) Access: 2012-08-29 18:57:35.430069290 +0800 Modify: 2012-08-29 18:57:35.354069292 +0800 Change: 2012-08-29 18:57:35.354069292 +0800 Birth: - chenqi@chenqi-OptiPlex-760:~/poky/bitbake$ date Wed Aug 29 19:04:17 CST 2012 chenqi@chenqi-OptiPlex-760:~/poky/bitbake$
######
引用来自“ChenQi”的答案
引用来自“$_$”的答案
atime是最近访问时间。。。。顾名思义。。。你cat一下它就会变了。。。。。
你的机器上是变的吗?
这是我的结果:
chenqi@chenqi-OptiPlex-760:~/poky/bitbake$ stat AUTHORS File: `AUTHORS' Size: 365 Blocks: 8 IO Block: 4096 regular file Device: 803h/2051d Inode: 9439976 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 1000/ chenqi) Gid: ( 1000/ chenqi) Access: 2012-08-29 18:57:35.430069290 +0800 Modify: 2012-08-29 18:57:35.354069292 +0800 Change: 2012-08-29 18:57:35.354069292 +0800 Birth: - chenqi@chenqi-OptiPlex-760:~/poky/bitbake$ cat AUTHORS Tim Ansell Phil Blundell Seb Frankengul Holger Freyther Marcin Juszkiewicz Chris Larson Ulrich Luckas Mickey Lauer Richard Purdie Holger Schurig chenqi@chenqi-OptiPlex-760:~/poky/bitbake$ stat AUTHORS File: `AUTHORS' Size: 365 Blocks: 8 IO Block: 4096 regular file Device: 803h/2051d Inode: 9439976 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 1000/ chenqi) Gid: ( 1000/ chenqi) Access: 2012-08-29 18:57:35.430069290 +0800 Modify: 2012-08-29 18:57:35.354069292 +0800 Change: 2012-08-29 18:57:35.354069292 +0800 Birth: - chenqi@chenqi-OptiPlex-760:~/poky/bitbake$ date Wed Aug 29 19:04:17 CST 2012 chenqi@chenqi-OptiPlex-760:~/poky/bitbake$
我的是变的
Jiang@local ~/tmp/test $ stat test
文件:"test"
大小:0 块:0 IO 块:4096 普通空文件
设备:11h/17d Inode:268877 硬链接:1
权限:(0644/-rw-r--r--) Uid:( 1000/ Jiang) Gid:( 1000/ Jiang)
最近访问:2012-08-29 19:06:22.200085281 +0800
最近更改:2012-08-29 19:06:22.200085281 +0800
最近改动:2012-08-29 19:06:22.200085281 +0800
创建时间:-
Jiang@local ~/tmp/test $ cat test
Jiang@local ~/tmp/test $ stat test
文件:"test"
大小:0 块:0 IO 块:4096 普通空文件
设备:11h/17d Inode:268877 硬链接:1
权限:(0644/-rw-r--r--) Uid:( 1000/ Jiang) Gid:( 1000/ Jiang)
最近访问:2012-08-29 19:06:51.364086914 +0800
最近更改:2012-08-29 19:06:22.200085281 +0800
最近改动:2012-08-29 19:06:22.200085281 +0800
Jiang@local ~/tmp/test $ echo hello > test
Jiang@local ~/tmp/test $ stat test
文件:"test"
大小:6 块:8 IO 块:4096 普通文件
设备:11h/17d Inode:268877 硬链接:1
权限:(0644/-rw-r--r--) Uid:( 1000/ Jiang) Gid:( 1000/ Jiang)
最近访问:2012-08-29 19:06:51.364086914 +0800
最近更改:2012-08-29 19:08:02.916090921 +0800
最近改动:2012-08-29 19:08:02.916090921 +0800
创建时间:-
Jiang@local ~/tmp/test $ !cat
cat test
hello
Jiang@local ~/tmp/test $ stat test
文件:"test"
大小:6 块:8 IO 块:4096 普通文件
设备:11h/17d Inode:268877 硬链接:1
权限:(0644/-rw-r--r--) Uid:( 1000/ Jiang) Gid:( 1000/ Jiang)
最近访问:2012-08-29 19:08:28.600092359 +0800
最近更改:2012-08-29 19:08:02.916090921 +0800
最近改动:2012-08-29 19:08:02.916090921 +0800
创建时间:-
######你看,你的access time也不是很准确阿。当你echo hello > test后,test的access time没有改变。