Re: /proc format: standard representation, parsing

Lenart Gabor (lgb@hal2000.hal.vein.hu)
Wed, 28 Oct 1998 14:19:18 +0100


I think both of the two methods can be usefull for some reasons.
So it would be nice to give binary AND text /proc files. Binary versions
can be smaller, and - for example - only one binary files would exist
for a /proc directory entry or something similar.

Maybe the procfs in kernel takes more and more memory as Linux - and
procfs - is growing, so we should take care about reorganizing the
proc file system.

It's probably not a bad idea that we have only binary /proc files
(with some badly needed text files), and other /proc text files
are generated on demand (a kernel module ?). This kernel module

In nutshell programs should use binary interfaces (faster), and users
(eg : check PCI devices in computer via /proc/pci) should use text
files. In nowdays program like top must eat lots of resource to parse
/proc files to display informations on processes. But at the other hand
this structure is great, if you're about checking something with some
simple command using a UNIX shell.

Since programs require relative fast access, while users only needs
text /proc files to check something using a simple "cat" command, it's
probably important to have good binary interface via /procfs (which can
be mmap()-ed as well), and some text interface working on binary files
as an interpreter or something similar.

In this case we can check if this issue is kernel or user space issue ...
Maybe text files in /proc can be implemented in user space ?
(OK, some /proc files can be important to have in kernel as text files too).

And, yeah : Linux sometimes contains lots of features which can be moved
into userspace. This can speed up the system as well in some cases.
(and kernel would require less memory)

---[ LGB/DC ]------------------[ root@hal2000 ]-----------------[ LINUX ]---
"The truth is out there" "We're living together" "The future is dark."
---[ 88/422022-4602 ]--[ http://www.hal.vein.hu/~lgb ]------[ 87/477074 ]---

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/