All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH] Freezer: Make freezing failures less verbose by default
@ 2007-11-14 23:38 Rafael J. Wysocki
  2007-11-15  0:25 ` Pavel Machek
  2007-11-15  0:25 ` Pavel Machek
  0 siblings, 2 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2007-11-14 23:38 UTC (permalink / raw)
  To: pm list; +Cc: Arkadiusz Miskiewicz, Pavel Machek, LKML

From: Rafael J. Wysocki <rjw@sisk.pl>

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).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 kernel/power/process.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Index: linux-2.6/kernel/power/process.c
===================================================================
--- linux-2.6.orig/kernel/power/process.c
+++ 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);

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

* Re: [RFC][PATCH] Freezer: Make freezing failures less verbose by default
  2007-11-14 23:38 [RFC][PATCH] Freezer: Make freezing failures less verbose by default Rafael J. Wysocki
  2007-11-15  0:25 ` Pavel Machek
@ 2007-11-15  0:25 ` Pavel Machek
  2007-11-15 17:06   ` [linux-pm] " Johannes Berg
  2007-11-15 17:06   ` Johannes Berg
  1 sibling, 2 replies; 5+ messages in thread
From: Pavel Machek @ 2007-11-15  0:25 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: pm list, Arkadiusz Miskiewicz, LKML

Hi!

> From: Rafael J. Wysocki <rjw@sisk.pl>
> 
> 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

> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
>  kernel/power/process.c |   11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> Index: linux-2.6/kernel/power/process.c
> ===================================================================
> --- linux-2.6.orig/kernel/power/process.c
> +++ 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);

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

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

* Re: [RFC][PATCH] Freezer: Make freezing failures less verbose by default
  2007-11-14 23:38 [RFC][PATCH] Freezer: Make freezing failures less verbose by default Rafael J. Wysocki
@ 2007-11-15  0:25 ` Pavel Machek
  2007-11-15  0:25 ` Pavel Machek
  1 sibling, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2007-11-15  0:25 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: pm list, Arkadiusz Miskiewicz, LKML

Hi!

> From: Rafael J. Wysocki <rjw@sisk.pl>
> 
> 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

> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
>  kernel/power/process.c |   11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> Index: linux-2.6/kernel/power/process.c
> ===================================================================
> --- linux-2.6.orig/kernel/power/process.c
> +++ 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);

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

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

* Re: [linux-pm] Re: [RFC][PATCH] Freezer: Make freezing failures less verbose by default
  2007-11-15  0:25 ` Pavel Machek
@ 2007-11-15 17:06   ` Johannes Berg
  2007-11-15 17:06   ` Johannes Berg
  1 sibling, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2007-11-15 17:06 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Rafael J. Wysocki, pm list, Arkadiusz Miskiewicz, LKML

[-- Attachment #1: Type: text/plain, Size: 507 bytes --]


> > 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.

> 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.

> acpi_sleep=verbose?

ewwww

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

That'd be good too.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* Re: Re: [RFC][PATCH] Freezer: Make freezing failures less verbose by default
  2007-11-15  0:25 ` Pavel Machek
  2007-11-15 17:06   ` [linux-pm] " Johannes Berg
@ 2007-11-15 17:06   ` Johannes Berg
  1 sibling, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2007-11-15 17:06 UTC (permalink / raw)
  To: Pavel Machek; +Cc: pm list, Arkadiusz Miskiewicz, LKML


[-- Attachment #1.1: Type: text/plain, Size: 507 bytes --]


> > 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.

> 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.

> acpi_sleep=verbose?

ewwww

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

That'd be good too.

johannes

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

end of thread, other threads:[~2007-11-15 17:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-14 23:38 [RFC][PATCH] Freezer: Make freezing failures less verbose by default Rafael J. Wysocki
2007-11-15  0:25 ` Pavel Machek
2007-11-15  0:25 ` Pavel Machek
2007-11-15 17:06   ` [linux-pm] " Johannes Berg
2007-11-15 17:06   ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.