#
b2cb2896 |
| 11-May-2018 |
Matt Macy <mmacy@FreeBSD.org> |
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
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@
show more ...
|
#
06bf2a6a |
| 10-May-2018 |
Matt Macy <mmacy@FreeBSD.org> |
Add simple preempt safe epoch API
Read locking is over used in the kernel to guarantee liveness. This API makes it easy to provide livenes guarantees without atomics.
Includes epoch_test kernel mod
Add simple preempt safe epoch API
Read locking is over used in the kernel to guarantee liveness. This API makes it easy to provide livenes guarantees without atomics.
Includes epoch_test kernel module to stress test the API.
Documentation will follow initial use case.
Test case and improvements to preemption handling in response to discussion with mjg@
Reviewed by: imp@, shurd@ Approved by: sbruno@
show more ...
|