提交 c64546b1 编写于 作者: H Harry Pan 提交者: Rafael J. Wysocki

PM / sleep: Measure the time of filesystems syncing

Measure the filesystems sync time during system sleep more precisely.

Among other things, this allows the pr_cont() to be dropped from
ksys_sync_helper() and makes automatic system suspend and hibernation
profiling somewhat more straightforward.
Signed-off-by: NHarry Pan <harry.pan@intel.com>
[ rjw: Changelog ]
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 b5dee313
......@@ -54,9 +54,14 @@ EXPORT_SYMBOL_GPL(unlock_system_sleep);
void ksys_sync_helper(void)
{
pr_info("Syncing filesystems ... ");
ktime_t start;
long elapsed_msecs;
start = ktime_get();
ksys_sync();
pr_cont("done.\n");
elapsed_msecs = ktime_to_ms(ktime_sub(ktime_get(), start));
pr_info("Filesystems sync: %ld.%03ld seconds\n",
elapsed_msecs / MSEC_PER_SEC, elapsed_msecs % MSEC_PER_SEC);
}
EXPORT_SYMBOL_GPL(ksys_sync_helper);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册