Linux kernel boot process
Kristof Provost
kristof at sigsegv.be
Sat Aug 4 12:03:40 EDT 2012
On 2012-08-04 21:15:15 (+0530), Sannu K <sannumail4foss at gmail.com> wrote:
> Is it possible to determine the reason for more time in hibernation
> compared to windows (or profile the resume time)? If possible I could
> do it in my machine and get some info which may be useful. Some one
> may jump to solve this (or there may be some magic tweak to get a
> better resume time) once it is profiled.
>
Possibly. I haven't looked at the details of the Linux hibernation
subsystem. Take a look at Documentation/power/basic-pm-debugging.txt for
a basic introduction.
> >> Why should all the drivers be started again? Just we can load
> >> the disk driver and some essential part of the kernel, disk driver (or
> >> only few drivers necessary for reading the hibernate image) and use
> >> the drivers stored in the disk (from hibernation image) for rest of
> >> the devices.
> > When resuming from hibernation all devices were powered down. The kernel
> > needs to run through all of the initialisation code again. It needs to
> > upload firmware, set configuration registers, ...
>
> That makes sense. Does that mean during hibernation the state of
> drivers will not be preserved?
That's correct.
> Will the driver code be discarded
> without saving in hibernation image (as we are starting the driver
> again while resuming)?
Again, I'm not an expert, but I see no reason to preserve the driver
state (or perhaps even the rest of the kernel state). I believe the
kernel doesn't even distinguish between a normal boot and a resume from
hibernation until just before it starts userspace.
Regards,
Kristof
More information about the Kernelnewbies
mailing list