Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jan 2001 15:45:35 -0800
From:      Kirk McKusick <mckusick@mckusick.com>
To:        Alfred Perlstein <bright@wintelcom.net>
Cc:        arch@FreeBSD.ORG
Subject:   Re: dynamic vs static sysctls? 
Message-ID:  <200101152345.PAA22257@beastie.mckusick.com>
In-Reply-To: Your message of "Mon, 15 Jan 2001 10:37:57 PST." <20010115103757.B7240@fw.wintelcom.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
	Date: Mon, 15 Jan 2001 10:37:57 -0800
	From: Alfred Perlstein <bright@wintelcom.net>
	To: Hajimu UMEMOTO <ume@FreeBSD.ORG>
	Cc: arch@FreeBSD.ORG
	Subject: dynamic vs static sysctls?

	[moved to -arch]

	...

	No one I know wants to use sysctl instead of getsysctlbyname afaik,
	however, I would like to know if my opinions are the what we're
	aiming for.

	...

	-- 
	-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
	"I have the heart of a child; I keep it in a jar on my desk."

I have an example where sysctl is still useful. In my work on a
background version of fsck, I have used sysctl to allow me to
pass information into the kernel that I want to have updated in
the filesystem. In the case of lost blocks, there may be hundreds
or even thousands of blocks that need to be put back into the
bit maps. Each non-contiguous block is passed in separately
which results in hundreds or thousands of sysctl calls. I want
to do one call to sysctlnametomib (a new, but obviously trivial
function) to return the numeric mib, and then use that mib on all
the subsequent sysctl calls. That dramatically cuts down on the
time it takes to return the blocks since I do not have to translate
the same name repeatedly (which takes far longer than the block
release itself). I would think that this might be an issue for
any application that uses sysctl to get/set the same information
repeatedly.

	Kirk McKusick


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101152345.PAA22257>