From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Nigel Cunningham <ncunningham@linuxmail.org>
Cc: David Chinner <dgc@sgi.com>, Pavel Machek <pavel@ucw.cz>,
Andrew Morton <akpm@osdl.org>,
LKML <linux-kernel@vger.kernel.org>,
xfs@oss.sgi.com
Subject: Re: [PATCH] Freeze bdevs when freezing processes.
Date: Thu, 26 Oct 2006 10:48:15 +0200 [thread overview]
Message-ID: <200610261048.15819.rjw@sisk.pl> (raw)
In-Reply-To: <1161850709.17293.23.camel@nigel.suspend2.net>
On Thursday, 26 October 2006 10:18, Nigel Cunningham wrote:
> Hi Dave.
>
> On Thu, 2006-10-26 at 17:30 +1000, David Chinner wrote:
> > On Wed, Oct 25, 2006 at 09:05:56PM +0200, Rafael J. Wysocki wrote:
> > > On Wednesday, 25 October 2006 15:23, Nigel Cunningham wrote:
> > > > >
> > > > > Well, my impression is that this is exactly what happens here: Something
> > > > > in the XFS code causes metadata to be written to disk _after_ the atomic
> > > > > snapshot.
> > > > >
> > > > > That's why I asked if the dirty XFS metadata were flushed by a kernel thread.
> > > >
> > > > When I first added bdev freezing it was because there was an XFS timer
> > > > doing writes.
> > >
> > > Yes, I noticed you said that, but I'd like someone from the XFS team to either
> > > confirm or deny it.
> >
> > We have daemons running in the background that can definitely do stuff
> > after a sync. hmm - one does try_to_freeze() after a wakeup, the
> > other does:
> >
> > if (unlikely(freezing(current))) {
> > set_bit(XBT_FORCE_SLEEP, &target->bt_flags);
> > refrigerator();
> > } else {
> > clear_bit(XBT_FORCE_SLEEP, &target->bt_flags);
> > }
> >
> > before it goes to sleep. So that one (xfsbufd - metadata buffer flushing)
> > can definitely wake up after the sync and do work,
Once it's entered the refrigerator, it won't return from it before
freeze_processes() is called (usually during the resume).
> > and the other could if the kernel thread freeze occurs after the sync.
Even if it does anything after the sync, it's okay as long as that's before we
create the image. And it is, because both threads are frozen before we do it.
> > Another good question at this point - exactly how should we be putting
> > these thread to to sleep? Are both these valid methods for freezing them?
> > And should we be freezing when we wake up instead of before we go to
> > sleep? i.e. what are teh rules we are supposed to be following?
>
> As you have them at the moment, the threads seem to be freezing fine.
Yes. IMO they are freezing fine.
In fact the suspend would fail if they didn't freeze unless one of them had
PF_NOFREEZE set.
Greetings,
Rafael
--
You never change things by fighting the existing reality.
R. Buckminster Fuller
next prev parent reply other threads:[~2006-10-26 8:50 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1161576735.3466.7.camel@nigel.suspend2.net>
[not found] ` <200610231236.54317.rjw@sisk.pl>
2006-10-24 14:44 ` [PATCH] Freeze bdevs when freezing processes David Chinner
2006-10-24 15:29 ` Rafael J. Wysocki
2006-10-24 16:27 ` Oleg Verych
2006-10-25 8:05 ` Pavel Machek
2006-10-24 16:33 ` David Chinner
2006-10-24 21:37 ` Pavel Machek
2006-10-25 0:13 ` David Chinner
2006-10-25 8:10 ` Pavel Machek
2006-10-25 8:38 ` David Chinner
2006-10-25 8:47 ` Pavel Machek
2006-10-25 12:32 ` Rafael J. Wysocki
2006-10-25 13:23 ` Nigel Cunningham
[not found] ` <200610252105.56862.rjw@sisk.pl>
2006-10-26 7:30 ` David Chinner
2006-10-26 8:18 ` Nigel Cunningham
2006-10-26 8:48 ` Rafael J. Wysocki [this message]
2006-10-26 8:57 ` David Chinner
2006-10-26 9:11 ` Rafael J. Wysocki
2006-10-27 1:38 ` David Chinner
2006-10-27 14:37 ` Rafael J. Wysocki
2006-10-29 17:35 ` Pavel Machek
[not found] ` <200610300029.25555.rjw@sisk.pl>
2006-10-29 23:46 ` Nigel Cunningham
2006-10-26 9:18 ` Nigel Cunningham
2006-10-26 9:08 ` Rafael J. Wysocki
2006-10-24 17:06 ` Christoph Hellwig
2006-10-24 21:26 ` Pavel Machek
2006-10-24 21:33 ` Christoph Hellwig
2006-10-24 21:43 ` Pavel Machek
2006-10-24 22:19 ` Nigel Cunningham
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=200610261048.15819.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=akpm@osdl.org \
--cc=dgc@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ncunningham@linuxmail.org \
--cc=pavel@ucw.cz \
--cc=xfs@oss.sgi.com \
/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