Ideas for spec for PMU/ACPI, Was: Patch to hal-spec : 1/6-pmu-acpi

David Zeuthen david at fubar.dk
Mon Jan 17 12:43:28 PST 2005


On Mon, 2005-01-17 at 21:10 +0100, Sjoerd Simons wrote:
> > > I don't think it's a problem to have one extra addon, but having a general
> > > guideline to what should become an addon and what should stay in the main
> > > code (or at least in a more general addon) would be nice :)
> > > 
> > 
> > I'd like that too :-). Guideline should probably be
> > 
> >  1. Reading sysfs, procfs is OK from inside hald
> >  2. Opening device files is not OK from inside hald
> >  3. Specialized device polling (like ink-level or battery-level from
> >     wireless mice) should be done as an addon
> > 
> > What about that?
> 
> Sounds cool. Another possibility is to ban all polling from hald itself and
> have one bigger ``generic'' addon which does polling when it keeps within the
> your given guidelines. It should fit nicely in the general addon
> infrastructure and has the same benifits of a normal addon, while not having an
> addon explosion :)..  
>
> For now it could be used for polling battery status and maybe stuff like
> network card statistics ? 

Yeah. I'm not sure what we would gain by having all polling in a
separate
process though. I guess it would be OK to keep it in the hald process,
if
not for keeping things simple. Network statistics, I'm not sure; it
would
create tons of traffic between at least hald and dbus-daemon-1. 

Things that change often should probably be abstracted using an in-
process
library (much like libhal-storage just for networking) rather than going
through the hal daemon. It would also make sense to put this into 
NetworkManager since you are probably interested in traffic on a global
level rather than per device.

> (btw. just noted that 2.6.10 has a sysfs entry called
> carrier in the network device, which can be used instead of doing MII stuff
> ourselves as far as i could see)
> 

I just committed some code to use this actually. See my other message in
the
"seemingly random hald system freeze" thread.

Cheers,
David


_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list