10902 vioif should do TX reclaim without NOTIFY_ON_EMPTY

Review Request #1818 — Created May 2, 2019 and submitted

jclulow
illumos-gate
master
10902
ebc6e77...
general

10902 vioif should do TX reclaim without NOTIFY_ON_EMPTY

See notes in the ticket.

  • 0
  • 0
  • 0
  • 2
  • 2
Description From Last Updated
jclulow
gdamore
  1. Ship It!
  2. 
      
gwr
  1. 
      
  2. usr/src/uts/common/io/vioif/vioif.c (Diff revision 1)
     
     

    Why drop sc_tx_lock and retake around the untimeout call?

    1. From untimeout(9F):

      DESCRIPTION
             The untimeout() function cancels a pending timeout(9F) request.
             untimeout() will not return until the pending callback is cancelled or
             has run. Because of this, locks acquired by the callback routine must
             not be held across the call to untimeout() or a deadlock may result.
      
    2. Forgot about that. OK.

  3. usr/src/uts/common/io/vioif/vioif.c (Diff revision 1)
     
     

    Might want to do this check earlier, where sc_tx_lock is still held.

    Sure wish we had a tool to do static analysis of lock coverage, which would warn about inconsistencies like this...

    1. It's a belt-and-suspenders diagnostic VERIFY(), so I think it's probably fine.

    2. As long as you thing a false hit is unlikely, that's fine by me.

  4. 
      
gwr
  1. Ship It!
  2. 
      
jclulow
Review request changed

Status: Closed (submitted)

Loading...