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

    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 <srivatsa.bhat@linux.vnet.ibm.com>
    ---

    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();
    usermodehelper_enable();
    Finish:
    pm_notifier_call_chain(PM_POST_SUSPEND);



    ---
    Regards,
    Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
    Linux Technology Center,
    IBM India Systems and Technology Lab


    \
     
     \ /
      Last update: 2011-11-03 20:11    [W:0.021 / U:90.828 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site