Skip to contentSkip to conversation

help kerneloops.org dianogse suspend_test_finish better

PATCH New Arjan van de Ven 1 participant 1 message Nov 18, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 help kerneloops.org dianogse suspend_test_finish better

Hi Linus,

please apply this patch to the 2.6.28-rc series; it will help kerneloops.org to better diagnose the warning in suspend_test_finish(), which is currently very hot but is lacking the essential detail of which component is causing the badness...

From: Arjan van de Ven <[email protected]>
Date: Tue, 18 Nov 2008 06:56:51 -0800
Subject: [PATCH] suspend: use WARN not WARN_ON to print the message

By using WARN(), kerneloops.org can collect which component is causing the delay and make statistics about that. suspend_test_finish() is currently the number 2 item but unless we can collect who's causing it we're not going to be able to fix the hot topic ones..

---
 kernel/power/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/power/main.c +1 -1
index 19122cf..b8f7ce9 100644
@@ -174,7 +174,7 @@ static void suspend_test_finish(const char *label)
 	 * has some performance issues.  The stack dump of a WARN_ON
 	 * is more likely to get the right attention than a printk...
 	 */
-	WARN_ON(msec > (TEST_SUSPEND_SECONDS * 1000));
+	WARN(msec > (TEST_SUSPEND_SECONDS * 1000), "Component: %s\n", label);
 }
 
 #else
Signature · 8 lines
1.6.0.3



-- 
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org