Skip to contentSkip to conversation

freezer: only show the state of tasks refusing to freeze

PATCH Applied Xiaotian Feng 4 participants 5 messages Mar 10, 2010

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

PATCH 1/1 freezer: only show the state of tasks refusing to freeze

show_state will dump all tasks state, so if freezer failed to freeze any task, kernel will dump all tasks state and flood the dmesg log. This patch makes freezer only show state of tasks refusing to freeze.

Cc Pavel Machek <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Cc Len Brown <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Alexey Dobriyan <[email protected]>
Cc David Rientjes <[email protected]>
---
 kernel/power/process.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
kernel/power/process.c +1 -2
index 5ade1bd..a0480cd 100644
@@ -88,12 +88,11 @@ static int try_to_freeze_tasks(bool sig_only)
 		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();
 		read_lock(&tasklist_lock);
 		do_each_thread(g, p) {
 			task_lock(p);
 			if (freezing(p) && !freezer_should_skip(p))
-				printk(KERN_ERR " %s\n", p->comm);
+				sched_show_task(p);
 			cancel_freezing(p);
 			task_unlock(p);
 		} while_each_thread(g, p);
Signature · 1 line
1.6.6.1
#1 lore raw
Quoted 6 lines

show_state will dump all tasks state, so if freezer failed to freeze any task, kernel will dump all tasks state and flood the dmesg log. This patch makes freezer only show state of tasks refusing to freeze.

ACK.

Quoted 18 lines
kernel/power/process.c +1 -2
index 5ade1bd..a0480cd 100644
@@ -88,12 +88,11 @@ static int try_to_freeze_tasks(bool sig_only)
 		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();
 		read_lock(&tasklist_lock);
 		do_each_thread(g, p) {
 			task_lock(p);
 			if (freezing(p) && !freezer_should_skip(p))
-				printk(KERN_ERR " %s\n", p->comm);
+				sched_show_task(p);
 			cancel_freezing(p);
 			task_unlock(p);
 		} while_each_thread(g, p);
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Acked-by on v1 1/1
#2 lore raw
In reply to Xiaotian Feng
Quoted 11 lines · Xiaotian Feng

show_state will dump all tasks state, so if freezer failed to freeze any task, kernel will dump all tasks state and flood the dmesg log. This patch makes freezer only show state of tasks refusing to freeze.

Cc Pavel Machek <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Cc Len Brown <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Alexey Dobriyan <[email protected]>
Cc David Rientjes <[email protected]>
#3 lore raw
Quoted 14 lines · David Rientjes
Quoted 11 lines · Xiaotian Feng

show_state will dump all tasks state, so if freezer failed to freeze any task, kernel will dump all tasks state and flood the dmesg log. This patch makes freezer only show state of tasks refusing to freeze.

Cc Pavel Machek <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Cc Len Brown <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Alexey Dobriyan <[email protected]>
Cc David Rientjes <[email protected]>
Quoted 1 line

Applied.

Rafael

#4 lore raw
In reply to David Rientjes
Quoted 14 lines · David Rientjes
Quoted 11 lines · Xiaotian Feng

show_state will dump all tasks state, so if freezer failed to freeze any task, kernel will dump all tasks state and flood the dmesg log. This patch makes freezer only show state of tasks refusing to freeze.

Cc Pavel Machek <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Cc Len Brown <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Alexey Dobriyan <[email protected]>
Cc David Rientjes <[email protected]>
Quoted 1 line

Applied.

Rafael