The suspend2 discussion resumes
[Posted April 25, 2007 by corbet]
One of the side discussions in the scheduler debate had to do with how the
CFS scheduler broke the out-of-tree
suspend2 suspend-to-disk code. Ingo
Molnar, acting on the reports, found and fixed a bug in CFS. As a way of
returning the favor, he then
posted a
review of the suspend2 code, noting that "
the patch looks sane
all around" and asking whether there were any plans to get suspend2
into the mainline kernel.
Perhaps Ingo wasn't listening the past few times this topic has been
brought up. His question was music to suspend2 author Nigel Cunningham's
ears; Nigel promptly responded with a lengthy reasons to merge suspend2 document. Among
many other things, he notes that the user-space software suspend
implementation (uswsusp) is still running behind suspend2 in features. It
is true that little has been heard from uswsusp in recent times; there has
not been a release since last November. Uptake by distributors has been
slow. But that didn't stop uswsusp hacker Pavel Machek from jumping in saying "Well, current uswsusp
code can do most of stuff suspend2 can do, with 20% (or so) of kernel
code."
Those who followed the discussion one year ago when uswsusp was merged may
remember that it triggered a debate on which functions can sensibly be
moved out of the kernel to user space. Many developers thought that
suspend-to-disk functionality was, perhaps, on the wrong side of that
line. After this debate, the number of proposals for moving functionality
out of the kernel fell significantly. People are still sensitive to the
issue, though, as can be seen in this response
from Linus:
This whole notion that "kernel lines of code" is somehow different
is a stupid and idiotic _disease_ that is spread by microkernel
people and people who have been brainwashed by them.
In a later, calmer moment he added:
This is why I don't believe in the whole kernel-line-counting
thing. I'm personally 100% convinced that it's better to have ten
times as many lines in the kernel, if it means that you can just
forget about version skew and bad user-space interfaces etc.
This discussion should help to keep a lid on future "move kernel code to
user space" projects. While there are certainly times when such moves make
sense, there are also situations where putting functionality in user space
just makes things harder. That said, one should not expect the
recently-posted Kcli patch,
intended to help move entire applications into the kernel, to get into the
mainline anytime soon.
Meanwhile, what about suspend2? It is possible that the renewed discussion
might provide some impetus for the merging of this longstanding
development. Certainly suspend2 has a significant user community which
would appreciate inclusion in the mainline. The amount of discussion has
been relatively low, though. It may well be that enough systems now have
working suspend-to-RAM support that the level of interest in
suspend-to-disk is rather lower than it once was.
(
Log in to post comments)