From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: pm list <linux-pm@lists.linux-foundation.org>
Cc: Arkadiusz Miskiewicz <arekm@maven.pl>,
Pavel Machek <pavel@ucw.cz>, LKML <linux-kernel@vger.kernel.org>
Subject: [RFC][PATCH] Freezer: Make freezing failures less verbose by default
Date: Thu, 15 Nov 2007 00:38:06 +0100 [thread overview]
Message-ID: <200711150038.07538.rjw@sisk.pl> (raw)
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);
next reply other threads:[~2007-11-14 23:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-14 23:38 Rafael J. Wysocki [this message]
2007-11-15 0:25 ` Pavel Machek
2007-11-15 17:06 ` [linux-pm] " Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200711150038.07538.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=arekm@maven.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®