Re: /proc and /kern

Riley Williams (rhw@bigfoot.com)
Tue, 8 Dec 1998 11:36:35 +0000 (GMT)


Hi David.

>>>> Another thought I had is to make the pseudo files in /proc and
>>>> /kern display real size information instead of 0, as they do
>>>> under BSD,

>>> That would be really nice, if you could have come guarantee that
>>> the size wouldn't change between stat time and access time.

>> Two questions:

>> 1. Why?

> So you don't have to recompute the /proc entries to set the size
> whenever someone does a stat() [a waste of perfectly good processor
> cycles]. Sure, you could have them return a bogus value, but in
> that case why even bother to set the size at all?

Just out of curiosity, how often do the contents of the following
files change:

/proc/cmdline
/proc/cpuinfo
/proc/pci
/proc/version

I also note that /proc/self is a symlink that (on my system) shows a
length of 64 when its actual value is nowhere near that long, and is
unlikely to ever approach it ???

Best wishes from Riley.

-
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/