Re: [linux-pm] [PATCH] Quieten freezer if !CONFIG_PM_DEBUG.

From: Pavel Machek
Date: Mon Oct 23 2006 - 08:32:35 EST


Hi!

> The freezing of processes is currently very noisy. This patch makes the
> noise dependant upon CONFIG_PM_DEBUG.
>
> Prepared against current git.
>
> Signed-off-by: Nigel Cunningham <nigel@xxxxxxxxxxxx>
>
> diff --git a/kernel/power/process.c b/kernel/power/process.c
> index 29be608..6829612 100644
> --- a/kernel/power/process.c
> +++ b/kernel/power/process.c
> @@ -15,6 +15,12 @@ #include <linux/module.h>
> #include <linux/syscalls.h>
> #include <linux/freezer.h>
>
> +#ifdef CONFIG_PM_DEBUG
> +#define freezer_message(msg, a...) do { printk(msg, ##a); } while(0)
> +#else
> +#define freezer_message(msg, a...) do { } while(0)
> +#endif
> +

No. We already have pr_debug().

And having stopping tasks: ============== line does not seem that bad
to me. Drivers are so noisy that this is very minor. Feel free to
adjust loglevels so that message is hidden.

...all the messages you modified should probably be fixed to be KERN_INFO...

> @@ -158,18 +164,18 @@ void thaw_processes(void)
> {
> struct task_struct *g, *p;
>
> - printk( "Restarting tasks..." );
> + freezer_message( "Restarting tasks..." );
> read_lock(&tasklist_lock);
> do_each_thread(g, p) {
> if (!freezeable(p))
> continue;
> if (!thaw_process(p))
> - printk(KERN_INFO " Strange, %s not stopped\n", p->comm );
> + freezer_message(KERN_INFO " Strange, %s not
stopped\n", p->comm );

This one definitely needs to stay, maybe should be promoted to
KERN_WARNING or something.

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/