tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: regression (crash) in sysmon/acpiacad



On Fri, 5 Feb 2010, Matthias Drochner wrote:


paul%whooppee.com@localhost said:
Regarding the earlier comment about your battery charge level not
changing...  Is this still true?

Just checked again and found that the charge level is
updated now, but only every 30s. (The code in acpibat_refresh()
suggests that cached values are kept only for 5s, and I
believe that is how it did behave formerly.)

The 30-second timer is the default poll interval for sysmon_envsys, so we're calling the refresh routine on that basis. I'm not totally up to speed on the acpibat internal stuff, so I don't know if it should be getting updated more frequently.

I definitely watched the battery state for a couple of
minutes yesterday, so something else must have happened.

Looking at acpibat_refresh()... the 5-seconds check uses
microtime() which is not necessarily monotonic. And, iirc,
I had booted Windows before, which sets the RTC to GMT+1,
so I had to force the clock back by a manual "ntpdate".
This might have killed status updating.
Well, just a hypothesis, but I'd suggest to use
getmicrouptime() for these checks.

Yeah, good point.


-------------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:      |
| Customer Service | FA29 0E3B 35AF E8AE 6651 |  paul at whooppee.com   |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index