lkml.org 
[lkml]   [2019]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3] PM / suspend: measure the time of filesystem syncing
Date
Thanks for comments.

> > + if (!IS_ENABLED(CONFIG_SUSPEND_SKIP_SYNC)) {
> > + ktime_t start;
> > + unsigned int elapsed_msecs;
> > +
> > + trace_suspend_resume(TPS("sync_filesystems"), 0, true);
> > + pr_info("Syncing filesystems ... ");
> > + start = ktime_get();
> > + ksys_sync();
> > + elapsed_msecs = ktime_to_ms(ktime_sub(ktime_get(),
> > start));
> > + pr_cont("(elapsed %d.%03d seconds) done.\n",
> > + elapsed_msecs / MSEC_PER_SEC,
> > + elapsed_msecs % MSEC_PER_SEC);
>
> One more nit.
>
> Since you are printing the sync time anyway, there is a little sense
> to
> split the message using pr_cont() that may be messed up with by any
> intervening messages, so why don't you just print a one-line
> pr_info("Filesystems sync: %d.%03d seconds\n", ...) message?
>
Yes, I agree.
In practical, I did see intervening messages (between pr_info and
pr_cont) when it came to long sync in kernel.
I was hesitated in this considering not fully understanding the
backdrop of split messages using pr_info() then pr_cont().

> Also, if you change it here, I guess it would be consistent to make
> an analogous change for hibernation.

One potential last-mile need your wisdom, which is about the switch
case of SNAPSHOT_FREEZE of the userspace interface you wrote.
I am yet to touch it, nor understand how to validate it.

That said, I am digesting your documents and source; I used the pm_test
from the doc to validate the patch on hibernation partially even non of
my handy laptons fully work well on it.


Sincerely,
Harry
\
 
 \ /
  Last update: 2019-02-20 17:45    [W:0.123 / U:12.796 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site