Re: Back to the future.
From: Pekka J Enberg
Date: Fri Apr 27 2007 - 03:25:34 EST
On Fri, 27 Apr 2007, Nigel Cunningham wrote:
> User input doesn't account for all system activity. Think of cron jobs
> or user initiated jobs that may have started before the cycle began.
Yes, but the _user_ did not start them so they didn't lose any work. See,
it might or might not be important but that's something the _userspace_
has much more knowledge than the kernel ever will.
On Fri, 27 Apr 2007, Nigel Cunningham wrote:
> Noooo! If the user looses data, the user will be concerned and we should
> be. I for one would do my best to avoid using software that loses my
> data for me. I wouldn't care if you said "Well, it's your fault. You
> lost the data." From my perspective as a user, I didn't lose the data,
> some part of the computer's OS did.
You are looking at snapshot/shutdown from kernel and user experience point
of view at the same time which causes confusion here.
Let me repeat: it is _absolutely no concern_ of the _kernel_ whether you
resume to a snapshot that does not contain all your precious data. The
kernel doesn't care one bit!
That being said, the _userspace solution_ obviously needs to take this
into account by blocking user input, making filesystems read-only, and
maybe even blocking certain background processes (cron and beagle indexing
come into mind).
On Fri, 27 Apr 2007, Nigel Cunningham wrote:
> Sorry, but I just don't believe filesystems should need to throw away
> metadata post resume. If we let data be changed after snapshotting (or
> ourselves cause it to be changed), we're the ones that are broken. Our
> snapshot is out of date and the expectations of userspace programs that
> were snapshotted will be out of date. Just imagine, for example, a
> userspace program that is snapshotted, then reads and deletes a
> temporary file. After the snapshot restore, it's running again. But
> wait, we can't read or delete the file again because it's already gone.
> Life just gets more complicated and confusing this way.
It doesn't. We can either make the filesystem read-only or, surprise,
surprise, make a _snapshot_ of the filesystem!
And while the points you raised are important for the full
end-user solution, it is absolutely not interesting to snapshot_system().
The only thing it needs to guarantee is a consistent snapshot that we can
resume later.
On Fri, 27 Apr 2007, Nigel Cunningham wrote:
> Maybe, but I'd still rather be encouraging!
You are. Perhaps you just don't know it yet. ;-)
Pekka
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/