Re: /proc/pci deprecation?

From: Jeff Garzik (jgarzik@pobox.com)
Date: Fri Dec 06 2002 - 17:17:01 EST


Patrick Mochel wrote:
> ISTR /proc/pci being deprecated at one point in the past. It may have only
> been discussed, though. In which case, is it possible to deprecate it?
> lscpi(8) is considered a superior means to derive the same information.
>
> Elimination of it would eliminate a chunk of code in drivers/pci/proc.c,
> and obviate the use of struct device::name by the PCI layer. This change
> would probably allow us to remove the name field altogether, since PCI is
> the only code that really relies on it (and only for /proc/pci AFAICT).

Historically, this was a Linus call :)

IIRC it was one of (a) deprecated, (b) removed, or (c) almost removed in
the past, and Linus un-deprecated it. The logic back then was that it
provides a quick summary of a lot of useful info, a la /proc/cpuinfo and
/proc/meminfo. i.e. you don't need lspci installed, just been /bin/cat.

Personally, I think it would be nice to eliminate /proc/pci -- in favor
of something that provides similar functionality from sysfs: "cat
/sys/all-busses" or somesuch. I dunno how feasible that is. The main
idea is to list as many attached devices as possible in one go, without
having to cat 40 different files :) [unfortunately I think this means I
am disagreeing with you ;)]

I do grant you it would make various __init sections and in-memory
structures smaller if we eliminated the names... do we want to? Sure
we have lseisa and lspci and lsusb, et. al. Does that obviate the need
for a simple summary of attached hardware?

        Jeff

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



This archive was generated by hypermail 2b29 : Sat Dec 07 2002 - 22:00:28 EST