Skip to content

Commit

Permalink
PM / suspend: show workqueue state in suspend flow
Browse files Browse the repository at this point in the history
If freezable workqueue aborts suspend flow, show
workqueue state for debug purpose.

Signed-off-by: Roger Lu <roger.lu@mediatek.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Roger Lu authored and Rafael J. Wysocki committed Jul 1, 2016
1 parent ea00f4f commit 7b776af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions kernel/power/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ static int try_to_freeze_tasks(bool user_only)
elapsed_msecs / 1000, elapsed_msecs % 1000,
todo - wq_busy, wq_busy);

if (wq_busy)
show_workqueue_state();

if (!wakeup) {
read_lock(&tasklist_lock);
for_each_process_thread(g, p) {
Expand Down
4 changes: 2 additions & 2 deletions kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -4369,8 +4369,8 @@ static void show_pwq(struct pool_workqueue *pwq)
/**
* show_workqueue_state - dump workqueue state
*
* Called from a sysrq handler and prints out all busy workqueues and
* pools.
* Called from a sysrq handler or try_to_freeze_tasks() and prints out
* all busy workqueues and pools.
*/
void show_workqueue_state(void)
{
Expand Down

0 comments on commit 7b776af

Please sign in to comment.