免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3541 | 回复: 2
打印 上一主题 下一主题

[内存管理] 请问dirtytime_expire_seconds的意义 [复制链接]

论坛徽章:
20
程序设计版块每日发帖之星
日期:2015-08-17 06:20:00程序设计版块每日发帖之星
日期:2016-07-16 06:20:00程序设计版块每日发帖之星
日期:2016-07-18 06:20:00每日论坛发贴之星
日期:2016-07-18 06:20:00黑曼巴
日期:2016-12-26 16:00:3215-16赛季CBA联赛之江苏
日期:2017-06-26 11:05:5615-16赛季CBA联赛之上海
日期:2017-07-21 18:12:5015-16赛季CBA联赛之青岛
日期:2017-09-04 17:32:0515-16赛季CBA联赛之吉林
日期:2018-03-26 10:02:16程序设计版块每日发帖之星
日期:2016-07-15 06:20:0015-16赛季CBA联赛之江苏
日期:2016-07-07 18:37:512015亚冠之萨济拖拉机
日期:2015-08-17 12:21:08
1 [报告]
发表于 2016-03-02 11:01 |显示全部楼层
http://lxr.oss.org.cn/source/fs/fs-writeback.c#L87

77 /*
78  * If an inode is constantly having its pages dirtied, but then the
79  * updates stop dirtytime_expire_interval seconds in the past, it's
80  * possible for the worst case time between when an inode has its
81  * timestamps updated and when they finally get written out to be two
82  * dirtytime_expire_intervals.  We set the default to 12 hours (in
83  * seconds), which means most of the time inodes will have their
84  * timestamps written to disk after 12 hours, but in the worst case a
85  * few inodes might not their timestamps updated for 24 hours.
86  */
87 unsigned int dirtytime_expire_interval = 12 * 60 * 60;

1249         {
1250                 .procname       = "dirtytime_expire_seconds",
1251                 .data           = &dirtytime_expire_interval,
1252                 .maxlen         = sizeof(dirty_expire_interval),
1253                 .mode           = 0644,
1254                 .proc_handler   = dirtytime_interval_handler,
1255                 .extra1         = &zero,
1256         },

1900 /*
1901  * Wake up bdi's periodically to make sure dirtytime inodes gets
1902  * written back periodically.  We deliberately do *not* check the
1903  * b_dirtytime list in wb_has_dirty_io(), since this would cause the
1904  * kernel to be constantly waking up once there are any dirtytime
1905  * inodes on the system.  So instead we define a separate delayed work
1906  * function which gets called much more rarely.  (By default, only
1907  * once every 12 hours.)
1908  *
1909  * If there is any other write activity going on in the file system,
1910  * this function won't be necessary.  But if the only thing that has
1911  * happened on the file system is a dirtytime inode caused by an atime
1912  * update, we need this infrastructure below to make sure that inode
1913  * eventually gets pushed out to disk.
1914  */
1915 static void wakeup_dirtytime_writeback(struct work_struct *w);
1916 static DECLARE_DELAYED_WORK(dirtytime_work, wakeup_dirtytime_writeback);

论坛徽章:
20
程序设计版块每日发帖之星
日期:2015-08-17 06:20:00程序设计版块每日发帖之星
日期:2016-07-16 06:20:00程序设计版块每日发帖之星
日期:2016-07-18 06:20:00每日论坛发贴之星
日期:2016-07-18 06:20:00黑曼巴
日期:2016-12-26 16:00:3215-16赛季CBA联赛之江苏
日期:2017-06-26 11:05:5615-16赛季CBA联赛之上海
日期:2017-07-21 18:12:5015-16赛季CBA联赛之青岛
日期:2017-09-04 17:32:0515-16赛季CBA联赛之吉林
日期:2018-03-26 10:02:16程序设计版块每日发帖之星
日期:2016-07-15 06:20:0015-16赛季CBA联赛之江苏
日期:2016-07-07 18:37:512015亚冠之萨济拖拉机
日期:2015-08-17 12:21:08
2 [报告]
发表于 2016-03-03 12:34 |显示全部楼层
就是一个定时器控制参数,控制什么时候执行wakeup_dirtytime_writeback

论坛徽章:
20
程序设计版块每日发帖之星
日期:2015-08-17 06:20:00程序设计版块每日发帖之星
日期:2016-07-16 06:20:00程序设计版块每日发帖之星
日期:2016-07-18 06:20:00每日论坛发贴之星
日期:2016-07-18 06:20:00黑曼巴
日期:2016-12-26 16:00:3215-16赛季CBA联赛之江苏
日期:2017-06-26 11:05:5615-16赛季CBA联赛之上海
日期:2017-07-21 18:12:5015-16赛季CBA联赛之青岛
日期:2017-09-04 17:32:0515-16赛季CBA联赛之吉林
日期:2018-03-26 10:02:16程序设计版块每日发帖之星
日期:2016-07-15 06:20:0015-16赛季CBA联赛之江苏
日期:2016-07-07 18:37:512015亚冠之萨济拖拉机
日期:2015-08-17 12:21:08
3 [报告]
发表于 2016-03-03 12:35 |显示全部楼层
控制dirty页面什么时候写回的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP