Messages in this thread | | | Date | Mon, 18 Aug 2014 19:14:13 -0700 | Subject | Re: [RFC][PATCH 2/2] PM: Suspend: Print wall time at suspend entry and exit | From | Todd Poynor <> |
| |
> Existing printk timestamps in a dmesg only log suspend activities > (e.g. filesystem syncs, freezing/unfreezing tasks etc) while the > system has already started to enter/exit the suspend state. Sometimes > it is handy to have suspend entry/exit overhead information while > debugging suspend issues. This patch print markers with wall > timestamps at suspend Entry and Exit in the kernel log. These > timestamps can be used to compute how long the system spent in > low-power suspend state plus the entry/exit overhead. > > This patch comes from the Android patch set, where its been used to > help diagnose battery life problems in various Android-based devices.
Thanks Amit. For this patch, we're actually moving away from primarily analyzing the kernel log of suspend times, instead logging this info via userspace. Android is now using the wakeup_count suspend interface (previously autosleep was employed), allowing userspace to be informed whenever suspend is entered and resumed. The Android batterystats service logs timestamps for these, along with the wakeup reason info previously discussed on the linux-pm list. But it still is occasionally useful to see the suspend times when debugging problems based on the kernel log.
Todd
| |