Date: Wed, 14 Jul 2010 13:34:58 -0500 From: Adam Vande More <amvandemore@gmail.com> To: Atom Smasher <atom@smasher.org> Cc: freebsd-hackers@freebsd.org, Joerg Sonnenberger <joerg@britannica.bec.de> Subject: Re: sysctl way too slow Message-ID: <AANLkTinlLdc3ks4goTtNnnurf-kL8YYa5UEM7CJPexa0@mail.gmail.com> In-Reply-To: <1007150303431.5546@smasher> References: <1007142345320.5546@smasher> <20100714144154.GB2186@britannica.bec.de> <1007150303431.5546@smasher>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jul 14, 2010 at 10:08 AM, Atom Smasher <atom@smasher.org> wrote:
> On Wed, 14 Jul 2010, Joerg Sonnenberger wrote:
>
> On Wed, Jul 14, 2010 at 11:49:07PM +1200, Atom Smasher wrote:
>>
>>> the same info is available on linux via /sys and /proc and on comparable
>>> hardware, i can get the info about 100x faster.
>>>
>>
>> Are you sure that Linux is not just caching the data? I know of at least
>> one system where it takes more than 100ms to query the battery state due to
>> extremely slow hardware, I wouldn't be surprised if you can do worse.
>>
> ==============
>
> i don't know if linux is caching it. if it is, then freebsd should at least
> have an option to do the same. the real test will be trying linux on the
> freebsd hardware and freebsd on the linux hardware. i don't know when i'll
> get a chance to do it, but i'll update the list with details when it
> happens.
>
FWIW, my old dell
> /usr/bin/time sysctl -n hw.acpi.battery.life hw.acpi.battery.time
hw.acpi.battery.state
100
-1
0
0.01 real 0.00 user 0.01 sys
--
Adam Vande More
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTinlLdc3ks4goTtNnnurf-kL8YYa5UEM7CJPexa0>
