From: Nigel Cunningham <ncunningham@linuxmail.org>
To: john stultz <johnstul@us.ibm.com>
Cc: Li Shaohua <shaohua.li@intel.com>,
lkml <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>, Pavel Machek <pavel@suse.cz>
Subject: Re: [PATCH]time run too fast after S3
Date: Tue, 23 Nov 2004 08:45:02 +1100 [thread overview]
Message-ID: <1101159901.7962.49.camel@desktop.cunninghams> (raw)
In-Reply-To: <1101148405.6735.107.camel@cog.beaverton.ibm.com>
Hi.
On Tue, 2004-11-23 at 05:33, john stultz wrote:
> I'm not all that familiar w/ the suspend code, but yea, this looks like
> an improvement. The previous code was wrong because they are setting
> xtime themselves, and then updating only jiffies. At the next timer
> interrupt, the difference between jiffies and wall_jiffies would then be
> added to xtime again.
That makes a lot of sense to me :>
It also happens with suspend to disk now that Pavel and I have added
sysdev support to our implementations.
I was doing some looking in this area last week, but ran out of time. I
was seeing the clock being out - sometimes - by 1 hour+.
That section of code could also be improved by reusing the value of the
first call to get_cmos_time(). The way that function works, two
consecutive calls will cause a one second delay for the second call. A
__get_cmos_time function that doesn't wait for the start of a second was
suggested for where we only care about consistency and not about getting
the start of the second. I'll send a patch shortly.
> Why they don't just use do_settimeofday() for all of this is a mystery
> to me. Are we wanting to pretend timer ticks arrived while we were
> suspended?
I think that was Pavel's idea; something about getting process times
right. Speaking for myself, I might be being short sighted, but I just
want to save the user having to run /sbin/hwclock --hctosys afterwards.
Regards,
Nigel
--
Nigel Cunningham
Pastoral Worker
Christian Reformed Church of Tuggeranong
PO Box 1004, Tuggeranong, ACT 2901
You see, at just the right time, when we were still powerless, Christ
died for the ungodly. -- Romans 5:6
prev parent reply other threads:[~2004-11-22 21:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-22 9:15 [PATCH]time run too fast after S3 Li Shaohua
2004-11-22 18:33 ` john stultz
2004-11-22 18:54 ` George Anzinger
2004-11-22 21:45 ` Nigel Cunningham [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1101159901.7962.49.camel@desktop.cunninghams \
--to=ncunningham@linuxmail.org \
--cc=akpm@osdl.org \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@suse.cz \
--cc=shaohua.li@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox