From: Pavel Machek <pavel@suse.cz>
To: Rob Landley <landley@trommello.org>
Cc: John Alvord <jalvo@mbay.net>,
zaimi@pegasus.rutgers.edu, linux-kernel@vger.kernel.org
Subject: Re: kernel upgrade on the fly
Date: Sat, 22 Jun 2002 10:40:14 +0200 [thread overview]
Message-ID: <20020622084014.GG102@elf.ucw.cz> (raw)
In-Reply-To: <20020619222836.078946A2@merlin.webofficenow.com>
Hi!
> > >> has anybody worked or thought about a property to upgrade the kernel
> > >> while the system is running? ie. with all processes waiting in their
> > >> queues while the resident-older kernel gets replaced by a newer one.
> > >
> > >Thought about, yes. At length. That's why it hasn't been done. :)
> >
> > IMO the biggest reason it hasn't been done is the existence of
> > loadable modules. Most driver-type development work can be tested
> > without rebooting.
>
> That's part of it, sure. (And I'm sure the software suspend work is
> leveraging the ability to unload modules.)
>
> There's a dependency tree: processes need resources like mounted filesystems
> and open file handles to the network stack and such, and you can't unmount
> filesystems and unload devices while they're in use. Taking a running system
> apart and keeping track of the pieces needed to put it back together again is
> a bit of a challenge.
It depends on what limitations you can live with.
> The software suspend work can't freeze processees individually to seperate
> files (that I know of), but I've heard blue-sky talk about potentially adding
> it. (Dunno what the actual plans are, pavel machek probably would).
> If
Its not software suspend's goal; something similar can be done from
userspace using ptrace, try googling for freezer. Martin Mares did that.
> processes could be frozen in a somewhat kernel independent way (so that their
> run-time state was parsed in again in a known format and flung into any
> functioning kernel), then upgrading to a new kernel would just be a question
> of suspending all the processes you care about preserving, doing a two kernel
> monte, and restoring the processes. Migrating a process from one machine to
> another in a network clsuter would be possible too.
Yeah, that would be very nice.
> Hmmm, what would be involved in serializing a process to disk? Obviously you
> start by sending it a suspend signal. There's the process stuff, of
> course.
You don't. You don't want process being frozen known it was
freezed. You just stop it in a special way.
> (Priority, etc.) That's not too bad. You'd need to record all the memory
> mappings (not just the contents of the physical and swapped out
> memory
Doable from userspace, its in /proc.
> You'd need to record all the open file handles, of course. (For actual files
> this includes position in file, corresponding locks, etc. For the zillions
> of things that just LOOK like files, pipes and sockets and character and
> block devices, expect special case code).
There's not enough info in /proc to do this, I believe. Plus this is
nasty to restore -- like forcing code into processes's address space
to do opening for you.
Pavel
--
(about SSSCA) "I don't say this lightly. However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa
next prev parent reply other threads:[~2002-06-24 14:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-18 21:21 kernel upgrade on the fly zaimi
2002-06-18 19:37 ` Rob Landley
2002-06-19 5:09 ` Michael S. Zick
2002-06-19 17:22 ` John Alvord
2002-06-19 16:56 ` Rob Landley
2002-06-22 8:40 ` Pavel Machek [this message]
2002-06-22 8:34 ` Pavel Machek
2002-06-18 21:30 ` Russell King
-- strict thread matches above, loose matches on Subject: below --
2002-06-20 20:19 zaimi
2002-06-21 13:42 ` Rob Landley
2002-06-20 20:40 Jesse Pollard
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=20020622084014.GG102@elf.ucw.cz \
--to=pavel@suse.cz \
--cc=jalvo@mbay.net \
--cc=landley@trommello.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zaimi@pegasus.rutgers.edu \
/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