public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Gautham R Shenoy <ego@in.ibm.com>,
	Oleg Nesterov <oleg@tv-sign.ru>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFD] Freezing of kernel threads
Date: Sat, 12 May 2007 21:17:09 +0200	[thread overview]
Message-ID: <20070512191709.GA428@elf.ucw.cz> (raw)
In-Reply-To: <200705122017.32792.rjw@sisk.pl>

Hi!

> Having considered the issue of freezing (or not freezing) kernel threads for a
> longer while I tend to agree with Linus that we shouldn't be freezing as many
> kernel threads as we currently freeze, but there's one thing that he doesn't
> seem to take into account.  Namely, there may be some kernel threads that
> actually *want* (or need) to be frozen. :-)
> 
> For the suspend they may be kernel threads that otherwise would need some
> special synchronization with some device drivers' .suspend() and .resume()
> callbacks or fs-related kernel threads.  For the CPU hotplug they might be
> kernel threads that otherwise would interfere with the removal or addition of
> CPUs.  Still, in each case there seems to be a limited group of kernel threads
> that may want to be frozen and the remaining kernel threads that shouldn't be
> involved in any freezer-related actions at all.  However, we currently require
> all kernel threads to take part in the freezing mechanism, which doesn't seem to
> be correct.

Well.. It is actually a feature.

These days, you have to either add PF_NOFREEZE explicitly (which
hopefully means you know what you are doing) or add try_to_freeze() at
specific place.

If you fail to do that, we'll see freezer failure, quickly, and catch
the simple bug.

I'm afraid that if we default to "do not freeze by default", someone
will just port zfs, will know nothing about suspend, and his 
"write management info somewhere periodically" thread will corrupt
people's disks.

OTOH... perhaps suspend/resume is common enough operation that people
_know_ they need to stop their writing? ...no, I do not think we are
there yet.
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  parent reply	other threads:[~2007-05-12 19:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-12 18:17 [RFD] Freezing of kernel threads Rafael J. Wysocki
2007-05-12 18:25 ` Linus Torvalds
2007-05-12 21:14   ` Rafael J. Wysocki
2007-05-12 19:17 ` Pavel Machek [this message]
2007-05-12 19:40   ` Linus Torvalds
2007-05-12 22:14     ` Pavel Machek
2007-05-12 22:08   ` Rafael J. Wysocki
2007-05-12 19:36 ` Gautham R Shenoy
2007-05-12 19:57   ` Linus Torvalds
2007-05-12 20:11     ` Linus Torvalds
2007-05-13  8:33     ` Gautham R Shenoy
2007-05-13 16:33       ` Linus Torvalds
2007-05-13 20:08         ` Rafael J. Wysocki
2007-05-13 20:49           ` Linus Torvalds
2007-05-13 21:14             ` Rafael J. Wysocki
2007-05-14  6:18         ` Srivatsa Vaddagiri
2007-05-14  7:26           ` Gautham R Shenoy
2007-05-14 10:07             ` Rafael J. Wysocki
2007-05-14  7:41           ` Dipankar Sarma

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=20070512191709.GA428@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=akpm@linux-foundation.org \
    --cc=ego@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@tv-sign.ru \
    --cc=rjw@sisk.pl \
    --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