From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 14 22:09:52 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41E76106568F for ; Wed, 14 Jul 2010 22:09:52 +0000 (UTC) (envelope-from atom@smasher.org) Received: from atom.smasher.org (atom.smasher.org [69.55.237.145]) by mx1.freebsd.org (Postfix) with SMTP id 090968FC14 for ; Wed, 14 Jul 2010 22:09:51 +0000 (UTC) Received: (qmail 5830 invoked by uid 1000); 14 Jul 2010 13:09:49 -0000 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Date: Thu, 15 Jul 2010 01:09:47 +1200 (NZST) From: Atom Smasher In-Reply-To: <20100714125503.GG1742@hoeg.nl> Message-ID: <1007150056561.5546@smasher> MIME-Version: 1.0 OpenPGP: id=0xB88D52E4D9F57808; algo=1 (RSA); size=4096; url=http://atom.smasher.org/pgp.txt References: <1007142345320.5546@smasher> <20100714125503.GG1742@hoeg.nl> To: Ed Schouten X-POM: The Moon is Waxing Crescent (11% of Full) X-Hashcash: 1:20:1007141309:ed@80386.nl::nu8tSHIkIChnv2wi:002xQC X-Hashcash: 1:20:1007141309:freebsd-hackers@freebsd.org::zTxrdNfWbBmNsMO8:000000 0000000000000000000000000qFM Cc: freebsd-hackers@freebsd.org Subject: Re: sysctl way too slow X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 22:09:52 -0000 On Wed, 14 Jul 2010, Ed Schouten wrote: > So what about other sysctls? Is it just these sysctls? It may be the > case that these values are not simply read from some variable in the > kernel, but really performs some hardware calls. Still, 436 msec is > quite a lot of time. =================== getting the same info on a linux box from /sys/class/power_supply/BAT0/* takes <10ms, even when reading all 32 files in the directory. meanwhile, on freebsd, the other hw.acpi.* variables i've tried are either reasonably fast (2-7 mS) or as slow, but no slower. at least not the handful that i've tried. hw.acpi.battery.* are the ones i'm actually interested in. -- ...atom ________________________ http://atom.smasher.org/ 762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808 ------------------------------------------------- "About all you can do in life is be who you are. Some people will love you for you. Most will love you for what you can do for them, and some won't like you at all." -- Rita Mae Brown