Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Nov 2002 04:29:25 -0800
From:      Maxime Henrion <mux@freebsd.org>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        "M. Warner Losh" <imp@bsdimp.com>, chuck_tuffli@agilent.com, freebsd-hackers@FreeBSD.ORG
Subject:   Re: load time module parameters?
Message-ID:  <20021106122925.GM26605@elvis.mu.org>
In-Reply-To: <3DC9035A.3DFCF3BB@mindspring.com>
References:  <20021105222958.GH17013@cre85086tuf.rose.agilent.com> <20021105.222147.10576668.imp@bsdimp.com> <20021106104421.GK26605@elvis.mu.org> <3DC9035A.3DFCF3BB@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert wrote:
> Maxime Henrion wrote:
> > With kenv(1) you can modify kernel environment variables, which hold the
> > tunables.  Previously, you could only set those at boot time.
> 
> Note that there are some values which are used to determine the
> size of KVA space allocations, and changing them after boot,
> even if it's permitted, will have no real effect.
> 
> For example, you can change the value of "maxfiles" with a sysctl,
> but doing so will not increase the number of simultaneous network
> connections your system will support, since the reserved space for
> tcpcb's and sockets is not increased.

Yes.

> The kernel environment is most useful for diagnostic porposes, and
> for use in the way descrived in this thread -- to provide a means
> of passing parameters that should not be parameters to modules that
> should not need parameters in the first place.  Many times, hacking
> the values post-boot will have little or no effect.  It's too bad
> the things that will have no effect were exported as writeable,
> instead of resulting in an error.

I agree this is not perfect, but I don't think we should return an error
though.  It would be bad to start duplicating the sysctl functionality
into the kernel environment.  What could be nice would be to unsetenv()
the environment variables after them being read and used, so that people
typing kenv won't see these variables in the output and so won't be
tempted to set them.

Cheers,
Maxime

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




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