HomeFreeBSD

epoch(9): fix priority handling, make callback lists pcpu, and other fixes

Description

epoch(9): fix priority handling, make callback lists pcpu, and other fixes

  • Lend priority to preempted threads in epoch_wait to handle the case in which we've had priority lent to us. Previously we borrowed the priority of the lowest priority preempted thread. (pointed out by mjg@)
  • Don't attempt allocate memory per-domain on powerpc, we don't currently handle empty sockets (as is the case on jhibbits Talos' board).
  • Handle deferred callbacks as pcpu lists and poll the lists periodically. Currently the interval is 1/hz.
  • Drop the thread lock when adaptive spinning. Holding the lock starves other threads and can even lead to lockups.
  • Keep a generation count pcpu so that we don't keep spining if a thread has left and re-entered an epoch section.
  • Actually removed the callback from the callback list so that we don't double free. Sigh ...

Approved by: sbruno@

Details

Provenance
mmacyAuthored on May 11 2018, 4:54 AM
Parents
rGef7f29d8e6ad: Test priority handling in epoch test.
Branches
Unknown
Tags
Unknown

Event Timeline