public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Pavel Machek <pavel@ucw.cz>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Gautham R Shenoy <ego@in.ibm.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Nigel Cunningham <nigel@nigel.suspend2.net>,
	Oleg Nesterov <oleg@tv-sign.ru>
Subject: Re: [RFC][PATCH][EXPERIMENTAL] Make kernel threads nonfreezable by default
Date: Mon, 28 May 2007 20:11:10 +0200	[thread overview]
Message-ID: <200705282011.11526.rjw@sisk.pl> (raw)
In-Reply-To: <20070528103302.GD18807@elf.ucw.cz>

On Monday, 28 May 2007 12:33, Pavel Machek wrote:
> Hi!
> 
> > Index: linux-2.6.22-rc3/Documentation/power/kernel_threads.txt
> > ===================================================================
> > --- linux-2.6.22-rc3.orig/Documentation/power/kernel_threads.txt
> > +++ linux-2.6.22-rc3/Documentation/power/kernel_threads.txt
> > @@ -1,13 +1,22 @@
> > -KERNEL THREADS
> > +The Freezer and Kernel Threads
> >  
> > -
> > -Freezer
> > -
> > -Upon entering a suspended state the system will freeze all
> > -tasks. This is done by delivering pseudosignals. This affects
> > -kernel threads, too. To successfully freeze a kernel thread
> > -the thread has to check for the pseudosignal and enter the
> > -refrigerator. Code to do this looks like this:
> > +Before entering a system-wide suspend state as well as before creating a
> > +hibernation snapshot image the system will freeze all tasks, which is done
> > +by delivering fake signals.  This affects kernel threads too, but they won't be
> > +frozen unless they declare that they want to.  For this purpose
> 
> Well... and unless thread that does disk writes or DMA _wants_ to, you
> have nice disk corruption... It should be pointed out that it is not
> voluntary for those types of threads.

Well, that really depends.

I think the only thing that must not be written to disk is filesystem stuff.
The other things (eg. writing directly to block devices etc.) doesn't hurt us.

Also, I think that DMA-ing while we're creating the image should be impossible
due to devices being frozen at that point.

That said, I think we need to write some better freezer documentation ASAP.

Greetings,
Rafael

  reply	other threads:[~2007-05-28 18:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-26 22:12 [RFC][PATCH][EXPERIMENTAL] Make kernel threads nonfreezable by default Rafael J. Wysocki
2007-05-28  8:09 ` Rafael J. Wysocki
2007-05-28 10:30   ` Pavel Machek
2007-05-28 18:11     ` Rafael J. Wysocki
2007-05-28  9:46 ` Nigel Cunningham
2007-05-28 18:17   ` Rafael J. Wysocki
2007-05-28 21:26     ` Nigel Cunningham
2007-05-28 22:51       ` Rafael J. Wysocki
2007-05-28 22:54         ` Nigel Cunningham
2007-05-30 22:01       ` [RFC][PATCH -mm] Freezer: " Rafael J. Wysocki
2007-05-28 10:33 ` [RFC][PATCH][EXPERIMENTAL] " Pavel Machek
2007-05-28 18:11   ` Rafael J. Wysocki [this message]
2007-05-29 11:31     ` Pavel Machek
2007-05-29 12:15       ` Rafael J. Wysocki
2007-05-29 12:48         ` Pavel Machek
2007-05-29 21:55           ` Rafael J. Wysocki
2007-05-29 12:59         ` Nigel Cunningham
2007-05-29 22:13           ` Rafael J. Wysocki
2007-05-29 22:15             ` Nigel Cunningham
2007-05-29 15:01         ` Linus Torvalds

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=200705282011.11526.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=akpm@linux-foundation.org \
    --cc=ego@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nigel@nigel.suspend2.net \
    --cc=oleg@tv-sign.ru \
    --cc=pavel@ucw.cz \
    --cc=torvalds@linux-foundation.org \
    /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