All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bojan Smojver <bojan@rexursive.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: linux-kernel@vger.kernel.org, "Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: [PATCH v5]: Improve performance of LZO hibernation
Date: Thu, 29 Sep 2011 18:23:32 +1000	[thread overview]
Message-ID: <1317284612.1956.5.camel@shrek.rexursive.com> (raw)
In-Reply-To: <CAOJsxLGUmV=5+fOJShbfc+kELcPS9pnE+DkNY9+TBS33VmzRFg@mail.gmail.com>

On Wed, 2011-09-28 at 16:02 +0300, Pekka Enberg wrote:
> 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.

I think we should be good with v7. If anyone called kthread_stop(),
error codes will be set. And we discard hibernation/thaw attempt based
on errors coming from compression/decompression threads.

In terms of thread pointer becoming a dangling one, I don't think that's
a worry. I see many instances of kthread_stop() throughout the kernel
code and none of them worry themselves with the pointer being bad.

I may still have v8, with some variable name cleanups and some redundant
code taken out.

-- 
Bojan


  parent reply	other threads:[~2011-09-29  8:23 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
2011-09-29  8:23           ` Bojan Smojver [this message]
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=1317284612.1956.5.camel@shrek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.