Re: Strange IO behaviour on wakeup from sleep
From: Tim Schmielau (tim_at_physik3.uni-rostock.de)
Date: 10/27/04
- Previous message: Christoph Hellwig: "Re: 2.6.9-mm1"
- In reply to: Benjamin Herrenschmidt: "Strange IO behaviour on wakeup from sleep"
- Next in thread: Benjamin Herrenschmidt: "Re: Strange IO behaviour on wakeup from sleep"
- Reply: Benjamin Herrenschmidt: "Re: Strange IO behaviour on wakeup from sleep"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 27 Oct 2004 13:20:29 +0200 (CEST) To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
On Wed, 27 Oct 2004, Benjamin Herrenschmidt wrote:
> Not much datas at this point yet, but paulus and I noticed that current
> bk (happened already last saturday or so) has a very strange problem
> when waking up from sleep (suspend to ram) on our laptops.
It's a shot in the dark, but I am concerned whether timers continue to
work correctly after suspend with the following patch from Linus' bk tree.
I think jiffies may not be set behind the back of the timer subsystem, but
maybe it works if we can guarantee there are no timers scheduled.
It might be worth backing out and retesting.
Tim
[PATCH] swsusp: fix process start times after resume
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/10/18 23:03:02-07:00 pavel@ucw.cz
# [PATCH] swsusp: fix process start times after resume
#
# Currently, process start times change after swsusp (because they are
# derived from jiffies and current time, oops). This should fix it.
#
# Signed-off-by: Andrew Morton <akpm@osdl.org>
# Signed-off-by: Linus Torvalds <torvalds@osdl.org>
#
# arch/i386/kernel/time.c
# 2004/10/18 22:26:45-07:00 pavel@ucw.cz +5 -1
# swsusp: fix process start times after resume
#
diff -Nru a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c
--- a/arch/i386/kernel/time.c 2004-10-27 03:58:08 -07:00
+++ b/arch/i386/kernel/time.c 2004-10-27 03:58:08 -07:00
@@ -319,7 +319,7 @@
return retval;
}
-static long clock_cmos_diff;
+static long clock_cmos_diff, sleep_start;
static int time_suspend(struct sys_device *dev, u32 state)
{
@@ -328,6 +328,7 @@
*/
clock_cmos_diff = -get_cmos_time();
clock_cmos_diff += get_seconds();
+ sleep_start = get_cmos_time();
return 0;
}
@@ -335,10 +336,13 @@
{
unsigned long flags;
unsigned long sec = get_cmos_time() + clock_cmos_diff;
+ unsigned long sleep_length = get_cmos_time() - sleep_start;
+
write_seqlock_irqsave(&xtime_lock, flags);
xtime.tv_sec = sec;
xtime.tv_nsec = 0;
write_sequnlock_irqrestore(&xtime_lock, flags);
+ jiffies += sleep_length * HZ;
return 0;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Christoph Hellwig: "Re: 2.6.9-mm1"
- In reply to: Benjamin Herrenschmidt: "Strange IO behaviour on wakeup from sleep"
- Next in thread: Benjamin Herrenschmidt: "Re: Strange IO behaviour on wakeup from sleep"
- Reply: Benjamin Herrenschmidt: "Re: Strange IO behaviour on wakeup from sleep"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|