Subject: Re: envsys version 2 API
To: Martin Husemann <martin@duskware.de>
From: Juan RP <juan@xtrarom.org>
List: tech-kern
Date: 04/27/2007 01:12:05
On Wed, 25 Apr 2007 00:13:04 +0200
Martin Husemann <martin@duskware.de> wrote:
> What would be a reasonable kqueue/kevent interface for this API?
> We should be able to avoid userland polling for sensor data, as the
> transfers now get pretty expensive.
I wanted to know why aiboost and other drivers were so expensive
recieving its values via gtredata and yesterday I did find a bug
in most drivers.
It's documented in PR kern/36226. I'm doing tests with aiboost(4) and
lm(4) on the same machine (aiboost is an ACPI wrapper that retrieves
the values from the chip, a Winbond W83627DHG in my case).
After fixing this bug, running an endless loop retrieving values
from the driver no longer results in any cpu time used.
I've used:
$ while true; do ./prop; done
prop calls prop_dictionary_recv_ioctl with ENVSYS_GTREDATA, and
uses prop_dictionary_externalize to print the XML output.
CPU Usage is now 0, YAY!
--
http://plog.xtrarom.org/
Juan RP's blog - NetBSD/pkgsrc news in Spanish