RFC: 405LP sleep

Todd Poynor tpoynor at mvista.com
Fri Dec 20 08:36:24 EST 2002

+int alarm_secs;
+int cdiv;
+char mode[16] = "standby";     /* "clock-suspend", "power-down",
"standby" */
+int attempts;  /* debugging */

Suggest more unique names for these globals.

+       jiffies += rtc_secs_elapsed * HZ;

If jiffies is jumped forward then can kernel events (such as those
waiting on a kernel timer) be missed?  Whether or not timer queues et al
are processed on wakeup, not sure if it's harmful to update the "kernel
time" when the kernel has done nothing during the sleep interval, maybe
causing various timeouts.  Has this been tried with applications like X
running and verified not to kill apps on wakeup?

Matt Locke and I have been discussing whether it's best to update wall
clock time but leave jiffies alone, since "kernel time" did not advance
during the sleep interval.  It's a little worrisome: the kernel advances
time by 10ms for its own operations, but wallclock time (xtime and RTC)
jumps forward 10 minutes.  We've tried this a little bit on a TI OMAP
and haven't seen anything die so far, but I imagine there'll be some
application that isn't happy about the situation no matter what choice
is made.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

More information about the Linuxppc-dev mailing list