public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nigel Cunningham <ncunningham@linuxmail.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: suspend2-devel@lists.suspend2.net,
	Olivier Galibert <galibert@pobox.com>,
	grundig <grundig@teleline.es>, Avuton Olrich <avuton@gmail.com>,
	jan@rychter.com, linux-kernel@vger.kernel.org
Subject: Re: uswsusp history lesson [was Re: [Suspend2-devel] Re: swsusp / suspend2 reliability]
Date: Sat, 8 Jul 2006 13:42:32 +1000	[thread overview]
Message-ID: <200607081342.40686.ncunningham@linuxmail.org> (raw)
In-Reply-To: <20060708002826.GD1700@elf.ucw.cz>

[-- Attachment #1: Type: text/plain, Size: 5255 bytes --]

Hi.

On Saturday 08 July 2006 10:28, Pavel Machek wrote:
> I really looked at suspend2 hard, year or so ago, when I was pretty
> tired of the flamewars. At that point I decided it is way too big to
> be acceptable to mainline, and got that crazy idea about uswsusp, that
> surprisingly worked out at the end.
>
> uswsusp makes suspend2 obsolete, and suspend2 now looks
> misdesigned. It puts too much stuff into the kernel, you know that
> already.

No, I don't. From my point of view, uswsusp is misdesigned, but suspend2 
isn't. Suspend2 keeps the stuff that ought to be done by the kernel in the 
kernel. It doesn't shift data out to userspace, only to copy it straight back 
to the kernel for I/O. It will keep working even if userspace crashes and 
burns. It leverages support for compression and encryption that's already in 
the kernel. It does a real image of memory, not a half-pie attempt that 
causes lots of faulting of pages etc post-resume. If there's any misdesign in 
Suspend2, it's that I haven't made it a special case of checkpointing. But, 
of course, there's no support for checkpointing in the rest of the kernel at 
the moment anyway.

> From your point of view, uswsusp is misdesigned, too. It is too damn
> hard to install. There's no way it could survive as a standalone patch
> -- the way suspend2 survives. Fortunately, from distro point of view,
> being hard to install does not matter that much. Distros already have
> their own initrds, etc. And in the long term, distros matter, and I'm
> quite confident I can make 90% distributions ship uswsusp + its
> userland; cleaner kernel code matters, too, and maybe you'll agree
> that if you only look at the kernel parts, uswsusp looks nicer.

It looks simple, I agree. But that's only because it's doing the minimum 
required.

> Now, you are asking me to review 14000 lines of code. That's quite a
> lot of code, and you did not exactly make reviewer's life easy. Also
> reviews usually stop at first "fatal" problem, and you still drive
> user interface from kernel. (Yes, drawing is done in userland, but
> core user interface code is still in kernel). That is "fatal".

I agree that I didn't do the best job of making the reviewer's life easy. But 
let's give me some credit. I did all those patches because I genuinely 
thought that's what was requested the last time I submitted patches for 
review. I didn't like splitting up the files into all those patches - it was 
a lot of work and took a lot of time. But I did it because I wanted to do 
what was asked and wanted to do what was necessary to get a good 
implementation into the vanilla kernel.

Frankly, I'd rather be working on improving drivers and helping implement the 
run-time power management than working on getting Suspend2 merged. But for 
now, this is the immediate task.

I don't know why you see the user interface code as a problem. All the kernel 
is doing is telling the userspace program, via a netlink socket, what's going 
on and receiving messages from the userspace program sometimes.

> (Greg mentioned /proc usage being "fatal", too).

> Now... moving user interface into userland, and removing /proc usage
> are big tasks, do you agree? And they will mean lot of changes, and
> lot of new testing.

Removing /proc isn't a big task. It will affect the hibernate script far more 
that the kernel code. The user interface is already in userland.

> Perhaps at this point right solution is to just drop suspend2
> codebase, and do it again, this time in userland? Kernel
> infrastructure is already there, and even if you wanted to replace
> [u]swsusp by suspend2, you have to understand how the old code
> works. (Another point you may like is that forking suspend.sf.net code
> is relatively easy; so even if we disagree about coding style of the
> userland parts, I can't veto it or something. And given that your only
> problem is including all the possible features, I probably will not
> have reason to stop you or something -- having all the features is
> okay in userland).

I don't want to fork anything. I didn't fork swsusp to start with, and I don't 
want to start forking things now. (If you want to debate that point, can you 
check the mailing list archives on Sourceforge, Berlios and suspend2.net 
first? You'll find that I just carried on where Florent left off).

> Now... switching to uswsusp kernel parts will make it slightly harder
> to install in the short term (messing with initrd). OTOH there's at
> least _chance_ to get to the point where suspend "just works" in
> Linux, in the long term...
>
> (Of course, you can just ignore this and keep maintaining out-of-tree
> suspend2. We'll also get to the point where it "just works"... it will
> just take a little longer.)

With your current design, I don't see how you're ever going to get to the 
level of functionality that Suspend2 has. I'm of course thinking of a full 
image of memory (although Rafael's patch a while back looked hopeful there) 
and support for other-than-just-one-swap-partition.

Regards,

Nigel
-- 
Nigel, Michelle and Alisdair Cunningham
5 Mitchell Street
Cobden 3266
Victoria, Australia

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-07-08  3:42 UTC|newest]

Thread overview: 135+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-26 15:47 Suspend2 - Request for review & inclusion in -mm Nigel Cunningham
2006-06-27 13:33 ` Pavel Machek
2006-06-27 15:22   ` [Suspend2-devel] " Brad Campbell
2006-06-27 15:41     ` Andreas Mohr
2006-06-27 16:01       ` Avuton Olrich
2006-06-27 22:23         ` Pavel Machek
2006-06-27 22:22       ` swsusp / suspend2 reliability (was Re: [Suspend2-devel] Re: Suspend2 - Request for review & inclusion in -mm) Pavel Machek
2006-06-27 22:38         ` Sebastian Kügler
2006-06-27 22:51           ` Pavel Machek
2006-06-27 23:18             ` Sebastian Kügler
2006-06-28 19:53               ` Pavel Machek
2006-06-28 22:19                 ` Sebastian Kügler
2006-06-28 22:24                   ` Pavel Machek
2006-06-28 22:37                     ` Sebastian Kügler
2006-06-28 22:46                       ` Pavel Machek
2006-06-28 23:06                         ` Sebastian Kügler
2006-06-28 22:52                   ` Rafael J. Wysocki
2006-06-28 23:09                     ` Sebastian Kügler
2006-06-28  8:56         ` Andreas Jellinghaus
2006-06-28 19:58           ` Pavel Machek
2006-07-06 19:15         ` swsusp / suspend2 reliability Jan Rychter
2006-07-07 13:50           ` Pavel Machek
2006-07-07 14:05             ` [Suspend2-devel] " Rohan Dhruva
2006-07-07 18:21               ` David Fox
2006-07-07 21:42                 ` Pavel Machek
2006-07-07 15:03             ` dirk husemann
2006-07-07 23:19               ` Pavel Machek
2006-07-07 18:03             ` Olivier Galibert
2006-07-07 23:18               ` Pavel Machek
2006-07-07 15:19           ` Avuton Olrich
2006-07-07 16:09             ` grundig
2006-07-07 17:44               ` Olivier Galibert
2006-07-07 21:39                 ` Pavel Machek
2006-07-07 21:56                   ` Olivier Galibert
2006-07-07 23:25                     ` Pavel Machek
2006-07-07 23:33                       ` [Suspend2-devel] " Nigel Cunningham
2006-07-08  0:04                         ` Pavel Machek
2006-07-08  0:28                         ` uswsusp history lesson [was Re: [Suspend2-devel] Re: swsusp / suspend2 reliability] Pavel Machek
2006-07-08  3:42                           ` Nigel Cunningham [this message]
2006-07-08 10:38                             ` Rafael J. Wysocki
2006-07-08 11:13                               ` Bojan Smojver
2006-07-08 18:34                                 ` Rafael J. Wysocki
2006-07-08 22:35                                   ` Bojan Smojver
2006-07-08 11:31                               ` Nigel Cunningham
2006-07-08 11:42                                 ` Bojan Smojver
2006-07-08 12:52                                 ` Pavel Machek
2006-07-08 13:26                                   ` Nigel Cunningham
2006-07-08 21:04                                     ` Pavel Machek
2006-07-08 22:25                                       ` Nigel Cunningham
2006-07-08 18:52                                 ` Rafael J. Wysocki
2006-07-08 21:10                                   ` Pavel Machek
2006-07-08 22:28                                     ` Nigel Cunningham
2006-07-08 23:54                                       ` Pavel Machek
2006-07-09  0:02                                         ` Nigel Cunningham
2006-07-09  0:09                                           ` Pavel Machek
2006-07-09 10:03                                           ` Rafael J. Wysocki
2006-07-11 12:45                                   ` Nigel Cunningham
2006-07-11 21:54                                     ` Rafael J. Wysocki
2006-07-11 22:01                                       ` Nigel Cunningham
2006-07-11 22:34                                         ` Rafael J. Wysocki
2006-07-11 23:00                                           ` Nigel Cunningham
2006-07-12 10:09                                             ` Rafael J. Wysocki
2006-07-12 10:16                                               ` Nigel Cunningham
2006-07-08 11:22                             ` Pavel Machek
2006-07-08  4:33                           ` Avuton Olrich
2006-07-08 11:12                             ` Pavel Machek
2006-07-08 11:21                               ` Nigel Cunningham
2006-07-08  4:58                           ` Bojan Smojver
2006-07-08  9:11                           ` uswsusp history lesson Jan Rychter
2006-07-08 10:14                             ` [Suspend2-devel] " Bojan Smojver
2006-07-08 10:41                               ` Arjan van de Ven
2006-07-08 11:11                                 ` Bojan Smojver
2006-07-08 11:13                                   ` Pavel Machek
2006-07-08 11:16                                     ` Bojan Smojver
2006-07-08 11:20                                     ` Nigel Cunningham
2006-07-08 13:19                                   ` Arjan van de Ven
2006-07-08 22:32                                     ` Bojan Smojver
2006-07-08 16:43                                 ` Olivier Galibert
2006-07-08 16:47                                   ` Arjan van de Ven
2006-07-08 17:01                                     ` Alon Bar-Lev
2006-07-08 19:36                                       ` grundig
2006-07-08 17:49                                     ` Olivier Galibert
2006-07-08 18:03                                       ` Arjan van de Ven
2006-07-08 21:46                                       ` Alan Cox
2006-07-09  0:19                                         ` Olivier Galibert
2006-07-08 17:39                                   ` Alan Cox
2006-07-08 23:57                                     ` Pavel Machek
2006-07-09  0:03                                       ` Nigel Cunningham
     [not found]                                 ` <ce9ef0d90607080942w685a6b60q7611278856c78ac0@mail.gmail.com>
2006-07-08 16:50                                   ` Arjan van de Ven
2006-07-08 19:25                                     ` Rafael J. Wysocki
2006-07-08 19:39                                       ` Arjan van de Ven
2006-07-08 20:22                                         ` Pavel Machek
2006-07-10  9:11                                         ` dirk husemann
2006-07-10  9:18                                           ` Arjan van de Ven
2006-07-10 10:02                                             ` Pavel Machek
2006-07-10 21:49                                               ` Nigel Cunningham
2006-07-10 23:22                                                 ` Pavel Machek
2006-07-10 23:37                                                   ` Nigel Cunningham
2006-07-10 12:45                                             ` Thomas Tuttle
2006-07-10 13:05                                               ` Arjan van de Ven
     [not found]                                       ` <ce9ef0d90607081248n1f2fc79fw199b493f3ca6313@mail.gmail.com>
2006-07-08 19:58                                         ` Rafael J. Wysocki
2006-07-08 20:13                                           ` Alon Bar-Lev
2006-07-08 20:23                                             ` Rafael J. Wysocki
2006-07-08 22:20                                         ` Nigel Cunningham
2006-07-08 23:46                                       ` Bojan Smojver
2006-07-08 23:53                                         ` Pavel Machek
2006-07-09  0:18                                           ` Bojan Smojver
2006-07-09  0:32                                             ` Pavel Machek
2006-07-09  1:05                                               ` Bojan Smojver
2006-07-09 13:51                                                 ` Rafael J. Wysocki
2006-07-09 21:06                                                   ` Nigel Cunningham
2006-07-09 21:36                                                     ` Rafael J. Wysocki
2006-07-09 21:46                                                       ` Nigel Cunningham
2006-07-09 22:30                                                         ` Rafael J. Wysocki
2006-07-10  3:57                                                     ` Jason Lunz
2006-07-10  6:20                                                       ` Nigel Cunningham
2006-07-11 14:47                                                         ` Jason Lunz
2006-07-11 20:13                                                           ` Bojan Smojver
2006-07-10  0:28                                                   ` Bojan Smojver
2006-07-09 12:15                                       ` Matthew Garrett
2006-07-09 21:04                                         ` Nigel Cunningham
2006-07-10  9:10                                       ` dirk husemann
2006-07-08  0:28                       ` [Suspend2-devel] Re: swsusp / suspend2 reliability Bojan Smojver
2006-07-07 19:27           ` Hua Zhong
2006-07-07 21:10             ` Alon Bar-Lev
2006-07-07 23:48               ` Christian Trefzer
2006-06-27 16:50     ` [Suspend2-devel] Re: Suspend2 - Request for review & inclusion in -mm dirk husemann
2006-06-27 19:03     ` Pavel Machek
2006-06-27 19:19       ` Dave Jones
2006-06-27 21:47         ` Pavel Machek
2006-06-28  6:00       ` Brad Campbell
2006-06-28 20:03         ` Pavel Machek
2006-06-28  6:09       ` Markus Gaugusch
     [not found]     ` <200606271940.23934.jaroslav@aster.pl>
     [not found]       ` <1e1a7e1b0606280228y6c4a0d19p12f8112d216d1aba@mail.gmail.com>
2006-06-28 11:31         ` [Suspend2-devel] " Tim Dijkstra
2006-06-27 23:37   ` 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=200607081342.40686.ncunningham@linuxmail.org \
    --to=ncunningham@linuxmail.org \
    --cc=avuton@gmail.com \
    --cc=galibert@pobox.com \
    --cc=grundig@teleline.es \
    --cc=jan@rychter.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=suspend2-devel@lists.suspend2.net \
    /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