Subject: Re: clock interrupt rate seems to be slow after resuming from hybernation on one of my laptops
To: Bill Studenmund <skippy@macro.stanford.edu>
From: Chris G. Demetriou <cgd@pa.dec.com>
List: port-i386
Date: 01/10/1998 11:41:42
> On 10 Jan 1998, enami tsugutomo wrote:
>
> > I recently got a new laptop and i've installed NetBSD on it. Almost
> > works fine except that clock interrupt rate seems to be slow on it
> > after resuming from hybernation (on the other hand, it is ok if from
> > suspend or stanby mode).
> >
> > Normally clockintr() should be called 100 times per second (and
> > actually called as so), but after resuming from hybernation, only
> > about 18 calls per second.
>
> Sounds like the bios is resetting the clock to the standard DOS value of
> ~18.4 Hz. Reseting the chip after restart sounds like the right thing to
> do.
>
> 4.4BSD had "reset" routines for each cdevsw/bdevsw table entry, to be
> called after a reset on an I/O bus. Maybe we need to restore them, and use
> them to set things up after suspend/resume?
He's not talking about suspend/resume. He's talking about
hibernation.
How, and if, hibernation is done is a BIOS- and hardware-specific
detail. The APM spec doesn't really cover it at all.
While we should probably implement some hibernation support in our
kernel -- if we can, in a sane way -- the device reset device switch
routines aren't really appropriate. What you really need is a
per-cfattach 'reset' routine, if anything. (The device reset routines
in the dev switch wouldn't even handle his clock init problem. 8-)
I don't think that the change to the clock code proposed will harm
anything. If that makes hibernation work on his laptop (and,
presumably, all laptops of that variety 8-), it might be reasonable to
put the change in the NetBSD source tree. However, it's very
premature to be talking about any sort of 'real' support for
hibernation.
cgd