public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nigel Cunningham <ncunningham@cyclades.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: Freezer Patches.
Date: Thu, 02 Jun 2005 08:08:29 +1000	[thread overview]
Message-ID: <1117663709.13830.34.camel@localhost> (raw)
In-Reply-To: <20050601130205.GA1940@openzaurus.ucw.cz>

Morning.

On Wed, 2005-06-01 at 23:02, Pavel Machek wrote:
> Hi!
> 
> > Here are the freezer patches. They were prepared against rc3, but I
> > think they still apply fine against rc5. (Ben, these are the same ones I
> > sent you the other day).
> 
> 304 seems ugly and completely useless for mainline

That's because you don't understand what it's doing.

The new refrigerator implementation works like this:

Userspace processes that begin a sys_*sync gain the process flag
PF_SYNCTHREAD for the duration of their syscall.

We then freeze processes in three distinct groups.

1. Userspace processes (p->mm) that don't have PF_SYNCTHREAD set are
signalled first. This causes them to enter the refrigerator, thereby
stopping them from submitting further I/O that could cause the syncing
threads to potentially spin for ever.

2. Syncing threads are signalled so that when they finish syncing (if
they haven't already), they also enter the refrigerator. Any processes
that were in group 2 but are now in group 1 are also signalled.

It is possible that no process was syncing data. We thus now call
sys_sync ourselves, to flush remaining dirty data to disk.

3. Kernel threads not needed during suspend (kjournald, eg) are frozen.

> 300: stopping softirqd seems dangerous to me... are you sure?

It's been that way for ages without any reports of deadlocks. I'm happy
to change it if it really was dangerous for some reason.

> 301: patching exit should not be neccessary. Why do you need it?

Maybe you're right. I think it's a left over from the old
implementation. I'll try removing the call and see how the freezer
survives some stress testing.

Regards,

Nigel


  parent reply	other threads:[~2005-06-01 22:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-01 12:33 Freezer Patches Nigel Cunningham
2005-06-01 13:02 ` Pavel Machek
2005-06-01 22:02   ` Benjamin Herrenschmidt
2005-06-01 22:13     ` Nigel Cunningham
2005-06-01 22:23       ` Benjamin Herrenschmidt
2005-06-01 22:08   ` Nigel Cunningham [this message]
2005-06-01 22:31     ` Pavel Machek
2005-06-01 22:45       ` Benjamin Herrenschmidt
2005-06-01 23:02         ` Pavel Machek
2005-06-02  0:35           ` Benjamin Herrenschmidt
2005-06-02  1:46             ` Nigel Cunningham
2005-06-02  1:49               ` Benjamin Herrenschmidt
2005-06-02  1:45           ` Nigel Cunningham
2005-06-02  1:48             ` Benjamin Herrenschmidt
2005-06-02  7:14             ` Pavel Machek
2005-06-02  7:26               ` Nigel Cunningham
2005-06-02  7:31                 ` Pavel Machek
2005-06-02  7:36                   ` Benjamin Herrenschmidt
2005-06-02  8:18                     ` Nigel Cunningham
2005-06-02 21:47                       ` Pavel Machek

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=1117663709.13830.34.camel@localhost \
    --to=ncunningham@cyclades.com \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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