public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] freezer: only show the state of tasks refusing to freeze
@ 2010-03-10  9:28 Xiaotian Feng
  2010-03-10  9:43 ` Pavel Machek
  2010-03-10 10:54 ` David Rientjes
  0 siblings, 2 replies; 4+ messages in thread
From: Xiaotian Feng @ 2010-03-10  9:28 UTC (permalink / raw)
  To: linux-pm
  Cc: linux-kernel, Xiaotian Feng, Pavel Machek, Rafael J. Wysocki,
	Len Brown, Andrew Morton, Alexey Dobriyan, David Rientjes

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.

Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Len Brown <len.brown@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: David Rientjes <rientjes@google.com>
---
 kernel/power/process.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/kernel/power/process.c b/kernel/power/process.c
index 5ade1bd..a0480cd 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -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);
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] freezer: only show the state of tasks refusing to freeze
  2010-03-10  9:28 [PATCH] freezer: only show the state of tasks refusing to freeze Xiaotian Feng
@ 2010-03-10  9:43 ` Pavel Machek
  2010-03-10 10:54 ` David Rientjes
  1 sibling, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2010-03-10  9:43 UTC (permalink / raw)
  To: Xiaotian Feng
  Cc: linux-pm, linux-kernel, Rafael J. Wysocki, Len Brown,
	Andrew Morton, Alexey Dobriyan, David Rientjes

> 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.
> 
> Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
> Cc: Pavel Machek <pavel@ucw.cz>

ACK.

> diff --git a/kernel/power/process.c b/kernel/power/process.c
> index 5ade1bd..a0480cd 100644
> --- a/kernel/power/process.c
> +++ b/kernel/power/process.c
> @@ -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);

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] freezer: only show the state of tasks refusing to freeze
  2010-03-10  9:28 [PATCH] freezer: only show the state of tasks refusing to freeze Xiaotian Feng
  2010-03-10  9:43 ` Pavel Machek
@ 2010-03-10 10:54 ` David Rientjes
  2010-03-10 22:00   ` Rafael J. Wysocki
  1 sibling, 1 reply; 4+ messages in thread
From: David Rientjes @ 2010-03-10 10:54 UTC (permalink / raw)
  To: Xiaotian Feng
  Cc: linux-pm, linux-kernel, Pavel Machek, Rafael J. Wysocki,
	Len Brown, Andrew Morton, Alexey Dobriyan

On Wed, 10 Mar 2010, Xiaotian Feng wrote:

> 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.
> 
> Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Cc: Len Brown <len.brown@intel.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Alexey Dobriyan <adobriyan@gmail.com>
> Cc: David Rientjes <rientjes@google.com>

Acked-by: David Rientjes <rientjes@google.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] freezer: only show the state of tasks refusing to freeze
  2010-03-10 10:54 ` David Rientjes
@ 2010-03-10 22:00   ` Rafael J. Wysocki
  0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2010-03-10 22:00 UTC (permalink / raw)
  To: David Rientjes
  Cc: Xiaotian Feng, linux-pm, linux-kernel, Pavel Machek, Len Brown,
	Andrew Morton, Alexey Dobriyan

On Wednesday 10 March 2010, David Rientjes wrote:
> On Wed, 10 Mar 2010, Xiaotian Feng wrote:
> 
> > 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.
> > 
> > Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
> > Cc: Pavel Machek <pavel@ucw.cz>
> > Cc: Rafael J. Wysocki <rjw@sisk.pl>
> > Cc: Len Brown <len.brown@intel.com>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: Alexey Dobriyan <adobriyan@gmail.com>
> > Cc: David Rientjes <rientjes@google.com>
> 
> Acked-by: David Rientjes <rientjes@google.com>

Applied.

Rafael

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-10 21:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-10  9:28 [PATCH] freezer: only show the state of tasks refusing to freeze Xiaotian Feng
2010-03-10  9:43 ` Pavel Machek
2010-03-10 10:54 ` David Rientjes
2010-03-10 22:00   ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox