linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: David Lang <david.lang@digitalinsight.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Pekka J Enberg <penberg@cs.helsinki.fi>,
	Nigel Cunningham <nigel@nigel.suspend2.net>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: Back to the future.
Date: Sat, 28 Apr 2007 02:02:33 +0200	[thread overview]
Message-ID: <200704280202.34040.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.63.0704271550220.10565@qynat.qvtvafvgr.pbz>

On Saturday, 28 April 2007 01:01, David Lang wrote:
> On Sat, 28 Apr 2007, Rafael J. Wysocki wrote:
> 
> > On Saturday, 28 April 2007 00:26, David Lang wrote:
> >> On Sat, 28 Apr 2007, Rafael J. Wysocki wrote:
> >>
> >>>>> We're freezing many of them just fine. ;-)
> >>>>
> >>>> And can you name a _single_ advantage of doing so?
> >>>
> >>> Yes.  We have a lot less interdependencies to worry about during the whole
> >>> operation.
> >>>
> >>>> It so happens, that most people wouldn't notice or care that kmirrord got
> >>>> frozen (kernel thread picked at random - it might be one of the threads
> >>>> that has gotten special-cased to not do that), but I have yet to hear a
> >>>> single coherent explanation for why it's actually a good idea in the first
> >>>> place.
> >>>
> >>> Well, I don't know if that's a 'coherent' explanation from your point of view
> >>> (probably not), but I'll try nevertheless:
> >>> 1) if the kernel threads are frozen, we know that they don't hold any locks
> >>> that could interfere with the freezing of device drivers,
> >>
> >> does teh process of freezing really wait until all locks have been released?
> >
> > Yes, it does.
> >
> >>> 2) if they are frozen, we know, for example, that they won't call user mode
> >>> helpers or do similar things,
> >>
> >> this won't matter unless the user mode helpers are going to do I/O or other
> >> permanent changes
> >
> > Please note that even accessing a file may be a permanent change.
> 
> if accessing a file on a read-only filesystem changes that filesystem it's a bug
> 
> see the recent thread about ext3 journal replays when mounting read-only as an 
> example.

Oh well.  Is this really wrong to protect users from such bugs, if we can do
that?

> >>> 3) if they are frozen, we know that they won't submit I/O to disks and
> >>> potentially damage filesystems (suspend2 has much more problems with that
> >>> than swsusp, but still.  And yes, there have been bug reports related to it,
> >>> so it's not just my fantasy).
> >>
> >> if you have the filesystems checkpointed then I/O after the freeze won't matter
> >> as you just revert to the checkpoint (and since this is going to be thrown away
> >> it can stay in ram)
> >
> > In that case, I would agree.  Currently, however, we're not even close to this
> > point.
> >
> > The checkpointing of filesystems would be a very welcome feature, but there's
> > no anyone working on it right now, AFAICT.
> >
> >> if we are willing to make a break with the past to implement the new snapshot
> >> capability, we should be able to use the LVM snapshot code to handle the
> >> filesystem
> >
> > Yes, we can do that, in principle, and screw all of the current users in the
> > process.  And finally we'd end up with something similar to what is done now,
> > IMHO.
> 
> however, the result may be a lot less 'special case pwoer management' code and a 

Are you referring to some specific code?

> lot more re-use of code that's in place for other uses.

This already is happening.

> if work on the current versions was stopped (other then trying to avoid 
> regressions) and a new version (with new userspace tools) was built in a way 
> that satisfies everyone the old version could be phased out in a year or two 
> (per the normal feture removal process)

May I say it's not realistic?

> > And no, the things are not just totally broken, as it may follow from these
> > discussions.  The problem is that the people who are discussing them so
> > viciously have never tried to write anything like the hibernation code.
> >
> > This is as though as I were discussing the design of the CPU schedulers,
> > although I only know how they work on a general level.
> >
> > Actually, the really problematic thing with the hibernation _right_ _now_ is
> > what Linus is so concerned about (and rightfully so) - that we use the
> > same device drivers' callbacks for the hibernation and suspend (aka s2ram).
> > The other things work quite well and are really robust.
> 
> if simply splitting the functions cleans everything up enough to satisfy 
> everyone then we're almost done right? ;-)

Practically, yes.  Theoretically, there's no software you can't improve
(except, probably, TeX), but that might not be worth the effort.

> however I think that there are other fundamental disagreements here, and neither 
> the 'do absolutly everything in the kernel' or the 'do almost nothing in the 
> kernel' approaches are going to fly in the long run.

I think we'll have an agreement, though.

> I think the userspace<->kernel interface is going to be different then
> either apprach is doing now,

You're probably right

> and as such it's an oppurtunity to make more drastic changes if they are
> appropriate.

Well, maybe.

> for example, why should we have LVM snapshot code and hibernate 
> snapshot/filesystem checkpoint code instead of just useing the LVM code (which 
> gets excercised and tested far more then the other code ever would be)? saying 
> that if you want to suspend to disk you need to use LVM is a change, but it's 
> a change that people could probably live with.

Well, that's a theory.  Probably a good one, but still. :-)

The positive aspect of all this is that people have started to pay attention to
what we're doing, and gradually they will learn about the problems that they're
just not seeing right now.

Greetings,
Rafael

  reply	other threads:[~2007-04-27 23:58 UTC|newest]

Thread overview: 136+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-26  6:04 Back to the future Nigel Cunningham
2007-04-26  7:28 ` Pekka Enberg
     [not found]   ` <1177573348.50 25.224.camel@nigel.suspend2.net>
2007-04-26  7:42   ` Nigel Cunningham
2007-04-26  8:17     ` Pekka Enberg
2007-04-26  9:28       ` Nigel Cunningham
2007-04-26 17:29         ` Luca Tettamanti
2007-04-26 16:56     ` Linus Torvalds
2007-04-26 17:03       ` Xavier Bestel
2007-04-26 17:34         ` Linus Torvalds
2007-04-26 20:08           ` Nigel Cunningham
2007-04-26 20:45             ` Linus Torvalds
2007-04-26 20:50               ` Nigel Cunningham
2007-04-27  0:10                 ` Olivier Galibert
2007-04-27 10:21                   ` Daniel Pittman
2007-04-27 23:19                   ` Nigel Cunningham
2007-04-26 21:38             ` Theodore Tso
2007-04-27 10:10               ` Christoph Hellwig
2007-04-26 22:08             ` Rafael J. Wysocki
2007-04-26 22:20               ` Nigel Cunningham
2007-04-26 23:15               ` Linus Torvalds
2007-04-27  7:51           ` Pekka Enberg
2007-04-26 17:07       ` Linus Torvalds
2007-04-26 18:22       ` Chase Venters
2007-04-26 18:50         ` David Lang
2007-04-26 19:56       ` Nigel Cunningham
2007-04-27  4:52         ` Pekka J Enberg
2007-04-27  6:08           ` Nigel Cunningham
2007-04-27  6:18             ` Pekka J Enberg
2007-04-27  6:29               ` Pekka J Enberg
2007-04-27  6:34               ` Nigel Cunningham
2007-04-27  6:50                 ` Pekka J Enberg
2007-04-27  7:03                   ` Nigel Cunningham
2007-04-27  7:24                     ` Pekka J Enberg
2007-04-27  9:50               ` Oliver Neukum
2007-04-27 10:12                 ` Pekka J Enberg
2007-04-27 19:07                   ` Oliver Neukum
2007-04-28  9:22                     ` Pekka Enberg
2007-04-28 13:37                       ` Oliver Neukum
2007-05-03 12:06                         ` Pavel Machek
2007-05-04 21:52                           ` Indan Zupancic
2007-05-05  9:16                             ` Pavel Machek
2007-05-05 12:02                               ` Indan Zupancic
2007-04-28 10:35                   ` Rafael J. Wysocki
2007-04-28 18:43                     ` David Lang
2007-04-28 19:37                       ` Rafael J. Wysocki
2007-04-27 21:24               ` Rafael J. Wysocki
2007-04-27 21:44                 ` Linus Torvalds
2007-04-27 22:04                   ` Rafael J. Wysocki
2007-04-27 22:08                     ` Linus Torvalds
2007-04-27 22:41                       ` Rafael J. Wysocki
2007-04-27 22:26                         ` David Lang
2007-04-27 23:21                           ` Rafael J. Wysocki
2007-04-27 23:01                             ` David Lang
2007-04-28  0:02                               ` Rafael J. Wysocki [this message]
2007-04-27 23:17                         ` Linus Torvalds
2007-04-27 23:45                           ` Rafael J. Wysocki
2007-04-27 23:57                             ` Nigel Cunningham
2007-04-27 23:50                               ` David Lang
2007-04-28  0:40                                 ` Linus Torvalds
2007-04-28  6:58                                 ` Oliver Neukum
2007-04-28  9:16                                   ` Pekka J Enberg
2007-04-28 18:28                                   ` David Lang
2007-05-03 17:18                                 ` Pavel Machek
2007-05-07  2:13                                   ` David Lang
2007-05-07  3:33                                     ` Kyle Moffett
2007-05-07 12:48                                     ` Pavel Machek
2007-05-07 12:52                                       ` Oliver Neukum
2007-05-07 14:37                                         ` david
2007-05-07 19:51                                           ` Pavel Machek
2007-05-07 19:55                                             ` david
2007-05-07 20:38                                               ` Pavel Machek
2007-05-08 17:36                                                 ` Disconnect
2007-04-27 23:59                             ` Linus Torvalds
2007-04-28  0:18                               ` Linus Torvalds
2007-05-05 11:42                                 ` Pavel Machek
2007-04-28  0:50                               ` Paul Mackerras
2007-04-28  1:00                               ` Rafael J. Wysocki
2007-04-28  1:12                                 ` Linus Torvalds
2007-04-28  0:54                                   ` David Lang
2007-04-28  1:44                                   ` Rafael J. Wysocki
2007-04-28  2:51                                     ` Daniel Hazelton
2007-04-28  7:00                                       ` progress meter in s2disk (was Re: Back to the future.) Pavel Machek
2007-04-28  8:50                                     ` Back to the future Pavel Machek
2007-04-28  9:24                                       ` Rafael J. Wysocki
2007-04-28 16:28                                       ` Linus Torvalds
2007-04-28 17:50                                         ` Rafael J. Wysocki
2007-04-28 21:25                                           ` Linus Torvalds
2007-04-28 23:03                                             ` Rafael J. Wysocki
2007-04-28 23:45                                               ` Linus Torvalds
2007-04-29  0:01                                                 ` Nigel Cunningham
2007-04-29  5:01                                                   ` Bojan Smojver
2007-04-29  3:43                                                 ` Kyle Moffett
2007-04-29  8:57                                                 ` Rafael J. Wysocki
2007-04-29  8:59                                                   ` Pavel Machek
2007-04-29  9:32                                                     ` Rafael J. Wysocki
2007-04-29  8:23                                             ` Pavel Machek
2007-04-29  9:22                                               ` Rafael J. Wysocki
2007-04-28 18:32                                       ` David Lang
2007-04-28 19:14                                         ` Rafael J. Wysocki
2007-04-28 18:44                                           ` David Lang
2007-05-03 15:25                           ` Pavel Machek
2007-04-27 22:07                   ` Nigel Cunningham
2007-04-28  1:03                     ` Kyle Moffett
2007-04-28  1:15                       ` Rafael J. Wysocki
2007-04-28  0:51                         ` David Lang
2007-04-28  1:25                         ` Kyle Moffett
2007-05-03 15:10                       ` Pavel Machek
2007-05-03 16:53                         ` Kyle Moffett
2007-05-04  7:52                           ` David Greaves
2007-05-04 13:27                             ` Kyle Moffett
2007-04-28  0:18                   ` Jeremy Fitzhardinge
2007-04-28  1:00                     ` Matthew Garrett
2007-04-28  1:05                       ` Jeremy Fitzhardinge
2007-05-03 15:14                         ` Pavel Machek
2007-06-01 19:00                           ` Eric W. Biederman
2007-04-28  1:08                       ` Rafael J. Wysocki
2007-04-27 20:44           ` Rafael J. Wysocki
2007-04-28 19:09         ` Bill Davidsen
2007-04-26 22:40       ` Pavel Machek
2007-04-27  5:41         ` Pekka Enberg
2007-04-27 14:55           ` Pavel Machek
2007-04-27 21:39             ` Nigel Cunningham
2007-04-26 22:42       ` Pavel Machek
2007-04-26 22:24         ` David Lang
2007-04-26 23:12           ` Pavel Machek
2007-04-26 22:49             ` David Lang
2007-04-26 23:27               ` Pavel Machek
2007-04-26 22:56                 ` David Lang
2007-04-27  0:23               ` Olivier Galibert
2007-04-27 12:49       ` Pavel Machek
2007-04-27 21:26         ` Rafael J. Wysocki
2007-04-27 22:12           ` David Lang
2007-04-26  8:38 ` Jan Engelhardt
2007-04-26  9:33   ` Nigel Cunningham
2007-04-28  0:28 ` Bojan Smojver
     [not found] <8e5l8-7SD-21@gated-at.bofh.it>
     [not found] ` <8e6Ka-1uR-3@gated-at.bofh.it>
     [not found]   ` <8e6TS-1Id-11@gated-at.bofh.it>
     [not found]     ` <8efu9-6mF-1@gated-at.bofh.it>
     [not found]       ` <8ekWV-6FF-33@gated-at.bofh.it>
     [not found]         ` <8el6y-6Sj-5@gated-at.bofh.it>
     [not found]           ` <8elpT-7wY-21@gated-at.bofh.it>
2007-04-28 11:04             ` Bodo Eggert

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=200704280202.34040.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=david.lang@digitalinsight.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nigel@nigel.suspend2.net \
    --cc=penberg@cs.helsinki.fi \
    --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;
as well as URLs for NNTP newsgroup(s).