Commit 4f598458 authored by Xiaotian Feng's avatar Xiaotian Feng Committed by Rafael J. Wysocki

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.
Signed-off-by: default avatarXiaotian Feng <dfeng@redhat.com>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
parent e1ee65d8
...@@ -88,12 +88,11 @@ static int try_to_freeze_tasks(bool sig_only) ...@@ -88,12 +88,11 @@ static int try_to_freeze_tasks(bool sig_only)
printk(KERN_ERR "Freezing of tasks failed after %d.%02d seconds " printk(KERN_ERR "Freezing of tasks failed after %d.%02d seconds "
"(%d tasks refusing to freeze):\n", "(%d tasks refusing to freeze):\n",
elapsed_csecs / 100, elapsed_csecs % 100, todo); elapsed_csecs / 100, elapsed_csecs % 100, todo);
show_state();
read_lock(&tasklist_lock); read_lock(&tasklist_lock);
do_each_thread(g, p) { do_each_thread(g, p) {
task_lock(p); task_lock(p);
if (freezing(p) && !freezer_should_skip(p)) if (freezing(p) && !freezer_should_skip(p))
printk(KERN_ERR " %s\n", p->comm); sched_show_task(p);
cancel_freezing(p); cancel_freezing(p);
task_unlock(p); task_unlock(p);
} while_each_thread(g, p); } while_each_thread(g, p);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment