On Fri, Mar 08, 2013 at 12:57:37AM +0530, Laxman Dewangan wrote:The alramtimer suspend failed when nearest alarm wakeup time isWhat can userspace now do with this information? How often is this now
less than 2 sec or rtc timer can not start.
In suspend/resume stress testing, we found that sometimes alramtimer
failed to suspend and hence it cancel the suspend ops. Add error prints
in suspend failure to provide more info when failure occurs to help
debugging.
Signed-off-by: Laxman Dewangan <ldewangan@xxxxxxxxxx>
---
kernel/time/alarmtimer.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c
index f11d83b..eed5646 100644
--- a/kernel/time/alarmtimer.c
+++ b/kernel/time/alarmtimer.c
@@ -249,6 +249,8 @@ static int alarmtimer_suspend(struct device *dev)
if (ktime_to_ns(min) < 2 * NSEC_PER_SEC) {
__pm_wakeup_event(ws, 2 * MSEC_PER_SEC);
+ dev_err(dev,
+ "Nearest alarm wakeup time < 2sec, avoiding suspend\n");
going to spam the syslog and cause confusion?