From: Hubert Tonneau <hubert.tonneau@pliant.cx>
To: linux-kernel@vger.kernel.org
Subject: User land kernel configuration/profiling model proposal
Date: Tue, 10 Sep 2002 08:19:45 GMT [thread overview]
Message-ID: <20020910081638Z319077-685+45673@vger.kernel.org> (raw)
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 :-)
reply other threads:[~2002-09-10 8:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020910081638Z319077-685+45673@vger.kernel.org \
--to=hubert.tonneau@pliant.cx \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®