Skip to contentSkip to conversation

Freezer: Make freezing failures less verbose by default

RFC PATCH In review Rafael J. Wysocki 3 participants 5 messages Nov 14, 2007 – Nov 15, 2007

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

RFC PATCH 1/1 Freezer: Make freezing failures less verbose by default

From: Rafael J. Wysocki <[email protected]>

Currently freezing failures are extremely verbose which sometimes is unnecessary and prevents the user from seeing which task could not be frozen.

Make them less verbose by default (ie. if CONFIG_PM_VERBOSE is unset).

---
 kernel/power/process.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
kernel/power/process.c +10 -1
Index: linux-2.6/kernel/power/process.c
===================================================================
@@ -163,6 +163,15 @@ static void cancel_freezing(struct task_
 	}
 }
 
+#ifdef CONFIG_PM_VERBOSE
+static inline void freezer_show_state(void)
+{
+	show_state();
+}
+#else /* !CONFIG_PM_VERBOSE */
+static inline void freezer_show_state(void) {}
+#endif /* !CONFIG_PM_VERBOSE */
+
 static int try_to_freeze_tasks(int freeze_user_space)
 {
 	struct task_struct *g, *p;
@@ -214,7 +223,7 @@ static int try_to_freeze_tasks(int freez
 		printk(KERN_ERR "Freezing of tasks failed after %d.%02d seconds "
 				"(%d tasks refusing to freeze):\n",
 				elapsed_csecs / 100, elapsed_csecs % 100, todo);
-		show_state();
+		freezer_show_state();
 		read_lock(&tasklist_lock);
 		do_each_thread(g, p) {
 			task_lock(p);
#1 lore raw

Hi!

Quoted 7 lines

From: Rafael J. Wysocki <[email protected]>

Currently freezing failures are extremely verbose which sometimes is unnecessary and prevents the user from seeing which task could not be frozen.

Make them less verbose by default (ie. if CONFIG_PM_VERBOSE is unset).

I don't think compile time option is right thing to do.

Dump just the stacks of the non-frozen tasks?

acpi_sleep=verbose?

Reorder dmesg so that you get backtraces, and _then_ list of the tasks?

Pavel

Quoted 34 lines
---
 kernel/power/process.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Index: linux-2.6/kernel/power/process.c
===================================================================

kernel/power/process.c +10 -1
@@ -163,6 +163,15 @@ static void cancel_freezing(struct task_
 	}
 }
 
+#ifdef CONFIG_PM_VERBOSE
+static inline void freezer_show_state(void)
+{
+	show_state();
+}
+#else /* !CONFIG_PM_VERBOSE */
+static inline void freezer_show_state(void) {}
+#endif /* !CONFIG_PM_VERBOSE */
+
 static int try_to_freeze_tasks(int freeze_user_space)
 {
 	struct task_struct *g, *p;
@@ -214,7 +223,7 @@ static int try_to_freeze_tasks(int freez
 		printk(KERN_ERR "Freezing of tasks failed after %d.%02d seconds "
 				"(%d tasks refusing to freeze):\n",
 				elapsed_csecs / 100, elapsed_csecs % 100, todo);
-		show_state();
+		freezer_show_state();
 		read_lock(&tasklist_lock);
 		do_each_thread(g, p) {
 			task_lock(p);
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#2 lore raw
Quoted 3 lines
Quoted 3 lines

Currently freezing failures are extremely verbose which sometimes is unnecessary and prevents the user from seeing which task could not be frozen.

That's a good thing.

Quoted 3 lines

I don't think compile time option is right thing to do.

Dump just the stacks of the non-frozen tasks?

That's harder to do because there's no support right now.

Quoted 1 line

acpi_sleep=verbose?

ewwww

Quoted 2 lines

Reorder dmesg so that you get backtraces, and _then_ list of the tasks?

That'd be good too.

johannes

#3 lore raw
In reply to Pavel Machek
Quoted 3 lines
Quoted 3 lines

Currently freezing failures are extremely verbose which sometimes is unnecessary and prevents the user from seeing which task could not be frozen.

That's a good thing.

Quoted 3 lines

I don't think compile time option is right thing to do.

Dump just the stacks of the non-frozen tasks?

That's harder to do because there's no support right now.

Quoted 1 line

acpi_sleep=verbose?

ewwww

Quoted 2 lines

Reorder dmesg so that you get backtraces, and _then_ list of the tasks?

That'd be good too.

johannes

#4 lore raw
In reply to Rafael J. Wysocki

Hi!

Quoted 7 lines

From: Rafael J. Wysocki <[email protected]>

Currently freezing failures are extremely verbose which sometimes is unnecessary and prevents the user from seeing which task could not be frozen.

Make them less verbose by default (ie. if CONFIG_PM_VERBOSE is unset).

I don't think compile time option is right thing to do.

Dump just the stacks of the non-frozen tasks?

acpi_sleep=verbose?

Reorder dmesg so that you get backtraces, and _then_ list of the tasks?

Pavel

Quoted 34 lines
---
 kernel/power/process.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Index: linux-2.6/kernel/power/process.c
===================================================================

kernel/power/process.c +10 -1
@@ -163,6 +163,15 @@ static void cancel_freezing(struct task_
 	}
 }
 
+#ifdef CONFIG_PM_VERBOSE
+static inline void freezer_show_state(void)
+{
+	show_state();
+}
+#else /* !CONFIG_PM_VERBOSE */
+static inline void freezer_show_state(void) {}
+#endif /* !CONFIG_PM_VERBOSE */
+
 static int try_to_freeze_tasks(int freeze_user_space)
 {
 	struct task_struct *g, *p;
@@ -214,7 +223,7 @@ static int try_to_freeze_tasks(int freez
 		printk(KERN_ERR "Freezing of tasks failed after %d.%02d seconds "
 				"(%d tasks refusing to freeze):\n",
 				elapsed_csecs / 100, elapsed_csecs % 100, todo);
-		show_state();
+		freezer_show_state();
 		read_lock(&tasklist_lock);
 		do_each_thread(g, p) {
 			task_lock(p);
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html