public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Bojan Smojver" <bojan@rexursive.com>
To: penberg@cs.helsinki.fi
Cc: linux-kernel@vger.kernel.org, rjw@sisk.pl
Subject: Re: [PATCH v5]: Improve performance of LZO hibernation
Date: Wed, 28 Sep 2011 23:18:55 +1000	[thread overview]
Message-ID: <7978609203.1001719135@rexursive.com> (raw)
In-Reply-To: CAOJsxLGUmV=5+fOJShbfc+kELcPS9pnE+DkNY9+TBS33VmzRFg@mail.gmail.com

------- 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 

  reply	other threads:[~2011-09-28 13:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-28  4:20 [PATCH v5]: Improve performance of LZO hibernation Bojan Smojver
2011-09-28  7:14 ` Pekka Enberg
2011-09-28  7:18   ` Bojan Smojver
2011-09-28  7:25     ` Pekka Enberg
2011-09-28  7:22 ` Pekka Enberg
2011-09-28  7:29   ` Bojan Smojver
2011-09-28  7:48     ` Pekka Enberg
2011-09-28  7:54       ` Bojan Smojver
2011-09-28 13:02         ` Pekka Enberg
2011-09-28 13:18           ` Bojan Smojver [this message]
2011-09-29  8:23           ` Bojan Smojver
2011-09-28  7:57       ` Bojan Smojver
2011-09-28  8:00       ` Bojan Smojver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7978609203.1001719135@rexursive.com \
    --to=bojan@rexursive.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=rjw@sisk.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox