Messages in this thread | | | From | (david parsons) | Subject | Re: /proc/pci unknown devices | Date | 25 Oct 1999 15:28:08 -0700 |
| |
In article <linux.kernel.Pine.LNX.4.10.9910251423510.26006-100000@anime.net>, Dan Hollis <goemon@sasami.anime.net> wrote: >On Mon, 25 Oct 1999, Gerard Roudier wrote: >> On Mon, 25 Oct 1999, Dan Hollis wrote: >> > Which programs depend on /proc/pci ? >> User's habits. ;-) >> You seem to want to kill /proc/pci. > >Yup ;) > >> At a rough approximate, such a table without any king of space >> optimization should not be greater than 16KB. Even twice this value does >> not look unacceptable bloat to me, given the actual size of any kernel >> ready to run for common configurations and common bloatwares we are using >> from userland (Netscape, Emacs, Gcc, Perl, Bash and others as the Java >> monstrosity really donnot care of sparing these 16KB of memory you seem to >> worry about). > >For those running embedded pci systems the extra 35kb of wasted text >strings is not really nice.
Easy solution to that; don't use those strings.
As other people have said, all you care about are the human-readable strings for the devices you want, and you can, with the use of some clever trickery (ioctls? writing to /proc/pci?) build a little user-space daemon that picks out the vendor/device identifiers from /proc/pci and, using the userland database that lspci (or whatever it's called) uses to map vendor/device to names, write the strings you actually need into /proc/pci.
And (similarly to devfs), if you don't want to use it, you don't have to use it. There is a large body of Linux users who don't care to have the kernel tell them anything, and thus /proc/pci will remain uncluttered by nasty verbosity in that case.
>This is purely for user convenience, hence it can be in userspace with >pciutils.
The spiffy thing about ``cat /proc/pci'' is that I don't need any userland tools outside of cat and ksh. (And
while read line;do echo "$line"; done
doesn't even need cat.)
>Besides, lspci is 100,000x more verbose and useful than 'cat /proc/pci'. >Is "user habit to type 'cat /proc/pci'" a good enough reason to keep it?
Yes.
____ david parsons \bi/ Bloating up userland to save 800 bytes of kernel data \/ doesn't seem to be a tremendous win.
- 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/
| |