Menu

#7 Error timer broken-- returns immediately and uses up massive

open
nobody
None
5
2008-08-10
2008-08-10
Anonymous
No

The add_timer in et131x_initpci.c returns immediately because the adapter->ErrorTimer.expires is not reset before the add_timer routine is called. This means that after the first call, the timer routine returns immediately. On a HZless machine immediately mean microseconds, and the system goes into the CPU overload.

Thus you need a line like (taken from later in the file where ErrorTimer.expires is defined)
adapter->ErrorTimer.expires=jiffies+TX_ERROR_PERIOD * HZ / 1000;
before calling add_timer again.

Note that since TX_ERROR_PERIOD is defined to be 1000 is is bad practice to code that way, and it should probably just read
adapter->ErrorTimer.expires=jiffies+HZ
which is once per second.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.
Try Free →