[lkml]   [2011]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [PATCH 12/17] freezer: clean up freeze_processes() failure path

On 11/01/2011 12:35 AM, Tejun Heo wrote:
> freeze_processes() failure path is rather messy. Freezing is canceled
> for workqueues and tasks which aren't frozen yet but frozen tasks are
> left alone and should be thawed by the caller and of course some
> callers (xen and kexec) didn't do it.
> This patch updates __thaw_task() to handle cancelation correctly and
> makes thaw_processes() call thaw_processes() on failure instead so
You meant freeze_processes() and freeze_kernel_threads() here, right?

> that the system is fully thawed on failure.

I really like this approach of handling freezing failures.

> Unnecessary
> thaw_processes() calls are removed from kernel/power/hibernate.c and
> user.c.
Did you miss kernel/power/suspend.c?
Shouldn't we be also doing something like this:

Signed-off-by: Srivatsa S. Bhat <>

diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index fdd4263..57aaca5 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -110,7 +110,6 @@ static int suspend_prepare(void)
} else
return 0;

- suspend_thaw_processes();

Srivatsa S. Bhat <>
Linux Technology Center,
IBM India Systems and Technology Lab

 \ /
  Last update: 2011-11-03 20:11    [W:0.115 / U:0.884 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site