Re: [PATCH v3] PM / suspend: measure the time of filesystem syncing

2019-02-22 Thread Pan, Harry
> Why don't you add a "sync" helper function in main.c with the timing > and message that will be called from hibernate.c, user.c and > suspend.c > (in the last one conditional on > !IS_ENABLED(CONFIG_SUSPEND_SKIP_SYNC))? > > That would reduce some code duplication nicely. I uploaded v5 in recipr

Re: [PATCH v3] PM / suspend: measure the time of filesystem syncing

2019-02-20 Thread Rafael J. Wysocki
On Wed, Feb 20, 2019 at 5:44 PM Pan, Harry wrote: > > 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); > > >

Re: [PATCH v3] PM / suspend: measure the time of filesystem syncing

2019-02-20 Thread Pan, Harry
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 ... "); > > + st

Re: [PATCH v3] PM / suspend: measure the time of filesystem syncing

2019-02-19 Thread Rafael J. Wysocki
On Thursday, February 14, 2019 12:15:43 PM CET Harry Pan wrote: > This patch gives the reader an intuitive metric of the time cost by > the kernel issuing a filesystem sync during suspend; although developer > can guess by the timestamp of next log or enable the ftrace power event > for manual calc

[PATCH v3] PM / suspend: measure the time of filesystem syncing

2019-02-14 Thread Harry Pan
This patch gives the reader an intuitive metric of the time cost by the kernel issuing a filesystem sync during suspend; although developer can guess by the timestamp of next log or enable the ftrace power event for manual calculation, this manner is easier to read and benefits the automatic script

[PATCH v3] PM / suspend: measure the time of filesystem syncing

2019-02-14 Thread Harry Pan
This patch gives the reader an intuitive metric of the time cost by the kernel issuing a filesystem sync during suspend; although developer can guess by the timestamp of next log or enable the ftrace power event for manual calculation, this manner is easier to read and benefits the automatic script