lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 20 Feb 2019 16:44:02 +0000
From:   "Pan, Harry" <harry.pan@...el.com>
To:     "rjw@...ysocki.net" <rjw@...ysocki.net>
CC:     "Brown, Len" <len.brown@...el.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "gs0622@...il.com" <gs0622@...il.com>,
        "pavel@....cz" <pavel@....cz>,
        "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>
Subject: Re: [PATCH v3] PM / suspend: measure the time of filesystem syncing

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

Powered by blists - more mailing lists