[vox-tech] "correct" way to enable run-time configuration of Linux?

Mike Simons vox-tech@lists.lugod.org
Thu, 05 Jun 2003 12:48:19 -0400


--S66JdqtemGhvbcZP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

There are a few methods in place for run-time configuration of Linux:

- /proc bunch of files
  (like as in /proc/sys/net/ipv4/*, writing a integer number into=20
   those files changes the value that the kernel uses at run time(

- /proc one big file
  (like /proc/ide/hda/settings, writing some magic string=20
   "breada_readahead:16" into the file changes the seeting)

- sysctl
  (a command you can run given a variable name to change from one=20
   value to the next)

There are also at least two non-runtime change methods:

- .config
  (when configuring the kernel a constant is defined which is the
   setting like CONFIG_APM_REAL_MODE_POWER_OFF)

- kernel command line
  (when the kernel boots, lilo or grub feed it the settings to use
   like ide0=3Ddma, for automatic use dma mode).


  Lately I've been running into a number of configuration changes which=20
require me to recompile or reboot the kernel to be able to take effect.
For example the number of times the kernel retries bad block reads, and
which method the kernel attempts to power off the machine.  Looking=20
at the code there is *NOTHING* that would prevent those settings from
being run-time set, internally the "value" is stored as an int, and
the compiled kernel binary is identical regardless of which way they=20
are set, just no one wrote a /proc or sysctl interface for the variable.

  I know historically /proc was a wonderful thing, at some point I think
it started to go out of favor and sysctl was good, then maybe both are
"okay"... but I stopped paying attention.  So now I'm wondering=20

- What method of kernel run-time configuration is most in favor?

--=20
GPG key: http://simons-clan.com/~msimons/gpg/msimons.asc
Fingerprint: 524D A726 77CB 62C9 4D56  8109 E10C 249F B7FA ACBE

--S66JdqtemGhvbcZP
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE+33RS4Qwkn7f6rL4RAibtAKCVkTfCWqgEtAyzSnlZ1orBzdGrYwCgou7G
T2GjCEX/6b5Df4QBDvOzVuI=
=JwyQ
-----END PGP SIGNATURE-----

--S66JdqtemGhvbcZP--