Date: Thu, 16 Jun 2011 23:06:16 +0300 From: Gleb Kurtsou <gleb.kurtsou@gmail.com> To: Russell Cattelan <cattelan@thebarn.com> Cc: freebsd-hackers@freebsd.org Subject: Re: kexec or similar for FreeBSD Message-ID: <20110616200616.GA67011@tops> In-Reply-To: <4DFA4C47.8060503@digitalelves.com> References: <4DFA4C47.8060503@digitalelves.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On (16/06/2011 13:32), Russell Cattelan wrote: > I have been contacted about possibly implementing a fast reboot > mechanism for FreeBSD similar to kexec on Linux. > > I have just started looking into how this accomplished so I figured > a note to freebsd hackers would also be a good place to ask > for comments. > > Has anybody looked at doing something like kexec? I was working on similar project some time ago. First of all you have to leave hardware in known good state for a new kernel. Reseting devices can be generally accomplished by unloading corresponding kernel modules (even if they are compiled in kernel). The biggest problem for me was timers and programmable interrupt controller. I didn't make it work properly, but my goals where much wider than replacing with another FreeBSD kernel. Aim was to restore initial BIOS state as much as possible. > Is it the right thing to do for FreeBSD. I'm concerned that the way > FreeBSD handles early kernel modules (loaded via the boot loader) > vs linux which does everything via initrd is going to be a problem. I find loader code easy work with. You could write dummy filesystem implementation for libstand. So that customized loader will load both kernel and modules yet while running FreeBSD. Your "reboot" procedure wouldn't even use any BIOS io interrupts. Linux boot is a real mess imho. > > Thanks for any help on this. > > -Russell Cattelan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110616200616.GA67011>