linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* User land kernel configuration/profiling model proposal
@ 2002-09-10  8:19 Hubert Tonneau
  0 siblings, 0 replies; only message in thread
From: Hubert Tonneau @ 2002-09-10  8:19 UTC (permalink / raw)
  To: linux-kernel

The external view of the kernel configuration status would be a set of global
entries such as:
/network/device/eth0/ip=10.11.12.13
/network/device/eth0/mask=255.255.255.0
...

Each open handle also has such a private tree, and each process also.

Now, only three kernel functions are required to provide overall kernel
configuration and profiling:

int kernel_configure(int handle,const char *buffer,int length);

  the buffer is assumed to be filled with a SET OF lines.
  'handle' is zero if accessing the kernel global tree instead of a handle
  specific one.

int kernel_query(int handle,const char *path,int path_length,char *buffer,int buffer_length);

  asks the kernel to fill the buffer with one line per entry,
  selecting only entries starting by 'path'

int open_process(int pid);

  returns a handle to the process enabling to access process related
  informations.


This model covers all at once the features from:
. /proc
. ioctl
. all specific user land tools

The problem with /proc filesystem is that it does not allow to access all
a subtree at once, so in order to provide a set of consistent informations,
they have to be provided as a single file, with the parsing related
nightmare.

The problem with ioctl is that using numbers is too much efficiency
with a too high lack of flexibility drawback, and once again, configuring
will often need several datas, so a structure with the versioning related
problems.

What's also very interesting with this model is that you can now have
a single tool for configuring all the kernel instead of multiple
'ifconfig' 'raidhotadd' and others.

Last point, it's also very valuable for providing feedback to developpers:
when one fails to compile the kernel, he can provide his .config file.
Now, when one computer bahaves stangely, he could provide a dump of
he's runtime configuration.


What's left as an exercise to readers is how this could fit in the Linux
kernel code :-)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-09-10  8:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-10  8:19 User land kernel configuration/profiling model proposal Hubert Tonneau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).