creating PCI-related sysfs entries

Linas Vepstas linas at austin.ibm.com
Sat Feb 4 03:58:30 EST 2006


On Fri, Feb 03, 2006 at 08:07:37PM +1100, Benjamin Herrenschmidt was heard to remark:
> On Thu, 2006-02-02 at 20:03 -0600, Linas Vepstas wrote:
> 
> > Yes, and EEH does do that (in mainline, 10K times in a row, 
> > last I tried). This email was in reference to the 
> > layout of /sys/bus/pci/slots which seems to have only hotplug
> > slots in there; I am not yet sure why. Its possible John Rose 
> > can shed some rapid insight? 
> 
> Ok... also, about this "max number of resets" thing, it would be useful
> in fact to have a rate limit rather ... a network card that for some
> reason need to be reset about once a day is still fairly useable and it
> would be nice if the system didn't consider it dead after 10 days ...

Yes, I've often thought about this. Only two designs come to mind:

1) a timer pops ever 8 hours, and decrements the failure count by 1.
   Thus, anything less than 3 resets a day would be acceptable.

2) Store the jiffies of the last reset. Increment the fail count only if
   previous jiffies is less than 8 hours ago. Set fail count to 1 if
   previous jiffies is more then 48 hours ago. Advantage over 1: no
   timers. 

Any preferences?

> Also, it might be useful to have an entry to force a retry on a card
> that has been considered dead...

Actually, hotplug remove/add or dlpar remove/add can be used to 
clear the count. (and that's how I do my test cases) The problem 
is that the documentation for this is buried somwhere where it
cannot be found.

Actually, this is one of my bigger/biggest concerns: the info 
about any of this is unfindable. I'd like to hype it up a bit,
but am not sure how.

--linas




More information about the Linuxppc64-dev mailing list