Page MenuHomeFreeBSD

Revamp em watchdog logic
ClosedPublic

Authored by sbruno on Mar 6 2015, 6:53 PM.
Tags
None
Referenced Files
F80189201: D2019.id5811.diff
Thu, Mar 28, 11:59 PM
Unknown Object (File)
Mon, Mar 25, 4:02 PM
Unknown Object (File)
Mon, Mar 25, 3:20 PM
Unknown Object (File)
Feb 23 2024, 7:08 AM
Unknown Object (File)
Jan 21 2024, 9:02 AM
Unknown Object (File)
Jan 16 2024, 4:11 PM
Unknown Object (File)
Dec 19 2023, 3:44 AM
Unknown Object (File)
Nov 21 2023, 2:06 AM
Subscribers

Details

Reviewers
jfv
hiren
erj
gnn
Summary

A simplified approach to hang detection, used in the new ixl driver, it relies on the
passes through the local timer, and the tx queue state to determine if an actual
hang has occurred. Any time a descriptor is used (packet sent), the tx queue is
flagged as busy. Then when txeof runs, it either clears the flag when all is clean,
or resets it to 1 if ANY are cleaned, if nothing is cleaned it increments the flag.

Local timer simply checks to see if busy ever reaches MAX (10, which is configurable),
and then sets it as HUNG, at that point there is one more timer cycle in which to
have any cleans, if not a watchdog reset will occur.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage

Event Timeline

jfv retitled this revision from to Revamp em watchdog logic.
jfv updated this object.
jfv edited the test plan for this revision. (Show Details)
jfv added reviewers: erj, sbruno.
sbruno edited edge metadata.

I'm testing this on a 82574L with MULTIQUEUE enabled as I can nonviolently get the watchdog to fire reliably with multiple rx queues. This seems to be working as intended and does seem to allow a slightly better recovery path.

The send and receive tests running during the watchdog do resume a bit. However, in my nonstandard test case I can get the card to stop sending interrupts to the driver with no further watchdog activity. I don't think this is a new problem however.

This revision is now accepted and ready to land.Mar 25 2015, 8:24 PM
sbruno requested changes to this revision.Mar 25 2015, 8:59 PM
sbruno edited edge metadata.
sbruno added inline comments.
head/sys/dev/e1000/if_em.c
947 ↗(On Diff #4131)

missing closing ')' here

This revision now requires changes to proceed.Mar 25 2015, 8:59 PM
sbruno edited reviewers, added: jfv; removed: sbruno.

Taking over this for testing.

sbruno updated this object.

Refresh this review against head.

Fix my own missing '(' comment.

This is the final revision before commit if there are no objections.

Add comment field above the #defines in if_em.h to capture intent.

hiren edited edge metadata.
This revision is now accepted and ready to land.Jun 1 2015, 4:31 PM
sbruno edited edge metadata.

Bump copywrite notice for if_em.c to 2015

This revision now requires review to proceed.Jun 1 2015, 4:35 PM
hiren edited edge metadata.
This revision is now accepted and ready to land.Jun 1 2015, 4:43 PM
jfv edited edge metadata.
sbruno edited edge metadata.

Be slightly pedantic with values permitted in txr->busy.

Define EM_TX_BUSY as 1 and replace assignment/comparisons of txr->busy
to use defined values instead of 1 or 0.

Make it a bit clearer what's going on here.

This revision now requires review to proceed.Jun 2 2015, 4:02 PM
jfv edited edge metadata.
This revision is now accepted and ready to land.Jun 2 2015, 5:01 PM
hiren edited edge metadata.