From owner-freebsd-hackers Thu Nov 4 19:22:54 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.rdc1.sfba.home.com (ha1.rdc1.sfba.home.com [24.0.0.66]) by hub.freebsd.org (Postfix) with ESMTP id 9B7C514DE6 for ; Thu, 4 Nov 1999 19:22:53 -0800 (PST) (envelope-from adsharma@c62443-a.frmt1.sfba.home.com) Received: from c62443-a.frmt1.sfba.home.com ([24.0.69.165]) by mail.rdc1.sfba.home.com (InterMail v4.01.01.00 201-229-111) with ESMTP id <19991105032253.IIBD11261.mail.rdc1.sfba.home.com@c62443-a.frmt1.sfba.home.com>; Thu, 4 Nov 1999 19:22:53 -0800 Received: (from adsharma@localhost) by c62443-a.frmt1.sfba.home.com (8.9.3/8.9.3) id TAA02224; Thu, 4 Nov 1999 19:22:53 -0800 Date: Thu, 4 Nov 1999 19:22:52 -0800 From: Arun Sharma To: Mike Smith Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: kstat - an API for gathering kernel stats Message-ID: <19991104192252.A2194@home.com> References: <19991104140551.A1331@home.com> <199911050230.SAA00664@dingo.cdrom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.6i In-Reply-To: <199911050230.SAA00664@dingo.cdrom.com>; from Mike Smith on Thu, Nov 04, 1999 at 06:30:01PM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Nov 04, 1999 at 06:30:01PM -0800, Mike Smith wrote: > Sysctl is faster than kstat once you have performed the name->oid > lookup. There is basically nothing that kstat can do that sysctl can't > do better and faster, apart from lookup-by-name. Can a loadable module, say a network driver register variables with sysctl ? Can sysctl itself be made a loadable module ? As for the speed, I don't think it is an issue - I can add another interface for getting a kstatid and make it fast. I'm not really saying that kstat is better than sysctl. In fact, it was an oversight on my part not to look closely at sysctl. My goal was to get some tools - specifically ktop and xosview to work on FreeBSD. So I don't particularly care how we get there - if it means adding a few more variables to the sysctl MIB, so be it. Now, if I make those changes and submit a patch, will it be considered for inclusion ? -Arun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message