diff mbox series

Show freezing tasks that caused a suspend abort

Message ID 20180823013711.17138-1-todd.e.brandt@linux.intel.com (mailing list archive)
State Mainlined
Delegated to: Rafael Wysocki
Headers show
Series Show freezing tasks that caused a suspend abort | expand

Commit Message

Todd Brandt Aug. 23, 2018, 1:37 a.m. UTC
For debug purposes it would be nice to see which tasks
caused a suspend abort, i.e. which tasks were still
in the process of freezing when a wakeup event occurred.
This patch adds the info to pm_debug_messages.

Signed-off-by: Todd Brandt <todd.e.brandt@linux.intel.com>
---
 kernel/power/process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rafael J. Wysocki Sept. 14, 2018, 8:26 a.m. UTC | #1
On Thursday, August 23, 2018 3:37:11 AM CEST Todd Brandt wrote:
> For debug purposes it would be nice to see which tasks
> caused a suspend abort, i.e. which tasks were still
> in the process of freezing when a wakeup event occurred.
> This patch adds the info to pm_debug_messages.
> 
> Signed-off-by: Todd Brandt <todd.e.brandt@linux.intel.com>
> ---
>  kernel/power/process.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/power/process.c b/kernel/power/process.c
> index 7381d49a44db..4b6a54da7e65 100644
> --- a/kernel/power/process.c
> +++ b/kernel/power/process.c
> @@ -96,7 +96,7 @@ static int try_to_freeze_tasks(bool user_only)
>  		if (wq_busy)
>  			show_workqueue_state();
>  
> -		if (!wakeup) {
> +		if (!wakeup || pm_debug_messages_on) {
>  			read_lock(&tasklist_lock);
>  			for_each_process_thread(g, p) {
>  				if (p != current && !freezer_should_skip(p)
> 

Applied, thanks!
diff mbox series

Patch

diff --git a/kernel/power/process.c b/kernel/power/process.c
index 7381d49a44db..4b6a54da7e65 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -96,7 +96,7 @@  static int try_to_freeze_tasks(bool user_only)
 		if (wq_busy)
 			show_workqueue_state();
 
-		if (!wakeup) {
+		if (!wakeup || pm_debug_messages_on) {
 			read_lock(&tasklist_lock);
 			for_each_process_thread(g, p) {
 				if (p != current && !freezer_should_skip(p)