lkml.org 
[lkml]   [2011]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5]: Improve performance of LZO hibernation
Date
From
------- Original message -------
> From: Pekka Enberg

> On Wed, Sep 28, 2011 at 10:54 AM, Bojan Smojver <bojan@rexursive.com>
> wrote:
>> I'm guessing here that you mean that parts of the kernel other than
>> hibernation code itself can do this (i.e. set the flag for the thread to
>> stop, so kthread_should_stop() returns true). Correct?
>
> Sorry, I'm not familiar this code. However, if you're checking for the
> condition..
>
> [snip]
>
>> Right now, this would result in - well I don't know what exactly - most
>> likely corrupted data on disk or on memory.
>
> ...this is not really an option for handling it.

Yeah, I changed the code in v7 to set the error code when this happens. So,
if the thread exits because something sets should_exit flag, error code
will terminate hibernation/thaw.

Now that I think about it, another problem may come up if the thread has
been shut down by something else just as it's supposed to be cleaned up at
end of the run. I can introduce a mutex in each structure and then
set/check whether thread pointer is NULL before reping the thread.

V8, here we come...

--
Bojan


\
 
 \ /
  Last update: 2011-09-28 15:21    [W:0.060 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site