Port-powerpc archive

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

Re: CPU speed management API




On Jan 23, 2005, at 6:37 PM, Allen Briggs wrote:

On Sun, Jan 23, 2005 at 03:21:00PM -0800, Jason Thorpe wrote:
I envisioned sysmon as being a nice centralized point for precisely
things like this.

And what exactly is sysmon?

Ok.

sysmon is really a framework for system monitoring. The whole idea was that you didn't have to know what kind of envsys devices you had ... acpi, via, lm78, etc... these things simply registered themselves with sysmon, and that is what you queried.

The same goes for things like power buttons, lid switches, etc. You don't care what kind of front panel power button you have, only that you have one.

Same with watchdog timers.

Sysmon currently provides a central switching point for all 3 of these kinds of things.

So, the idea is that you could extend it to provide control going in the other direction, as well. The userspace power management policy engine should not have to care if you have SpeedStep, CoolYourJets, or whatever. Instead, these platform-specific control mechanisms should register themselves with sysmon, which then would provide a generic interface for controlling them.

That make sense?

$ apropos sysmon
powerd (8) - power management daemon for sysmon

And powerd doesn't reference it further.

Yah, I ought to write a sysmon(9) manual page.

I see it in src/sys/dev/sysmon, but its hard to know what it should
be unless it's documented.  envsys still has the "This API is
experimental and may be deprecated at any time" note on it and:

Eh, I don't really agree with that. It's pretty well entrenched now, and while the argument could be made for sysctl'ing it now that we have a better sysctl, I think the interface should still be provided through sysmon... i.e. sysmon sysctls, not individual lm0.whatever.whatever sysctls.

Anyway, sysmon isn't just envsys.  It does other stuff, too.

I like a couple of the aspects of cpufreq(9) in Linux, but I'd like
to see something tied into the things that sysmon has under its
control.  I haven't yet looked to see what, if anything, any other
BSD is doing in this area.

I'm not familiar with cpufreq(9), but it's certainly reasonable to mine it for ideas for a similar subsystem in sysmon. So long as the API is generic enough to represent different configuration models for this type of thing.

        -- Jason R. Thorpe <thorpej%shagadelic.org@localhost>

Attachment: PGP.sig
Description: This is a digitally signed message part



Home | Main Index | Thread Index | Old Index