aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/dev/acpica/components
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2017-03-03 16:28:03 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2017-03-03 16:28:03 +0000
commit1f827dab9ec542a8872cd8b4b2e9407930b0463e (patch)
tree62f6ab68ab047a481d49ab4936a32f149c07c677 /sys/contrib/dev/acpica/components
parent1df22ae01f12b6a1c69d1b0d4b53b8ac5f5a9342 (diff)
Update the LinuxKPI RCU and SRCU wrappers for the concurrency kit, CK.
- Optimise the RCU implementation to not allocate and free ck_epoch_records during runtime. Instead allocate two sets of ck_epoch_records per CPU for general purpose use. The first set is only used for reader locks and the second set is only used for synchronization and barriers and is protected with a regular mutex to prevent simultaneous issues. - Move the task structure away from the rcu_head structure and into the per-CPU structures. This allows the size of the rcu_head structure to be reduced down to the size of two pointers. - Fix a bug where the linux_rcu_barrier() function only waited for one per-CPU epoch record to be completed instead of all. - Use a critical section or a mutex to protect ck_epoch_begin() and ck_epoch_end() depending on RCU or SRCU type. All the ck_epoch_xxx() functions, except ck_epoch_register(), ck_epoch_unregister() and ck_epoch_recycle() are not re-entrant and needs a critical section or a mutex to operate in the LinuxKPI, after inspecting the CK implementation of the above mentioned functions. The simultaneous issues arise from per-CPU epoch records being shared between multiple threads depending on the amount of taskswitching and how many threads are involved with the RCU and SRCU operations. - Properly free all epoch records by using safe list traversal at LinuxKPI module unload. It turns out the ck_epoch_recycle() always have the records on an internal list and use a flag in the epoch record to track allocated and free entries. This would lead to use after free during module unload. - Remove redundant synchronize_rcu() call from the linux_compat_uninit() function. Let the linux_rcu_runtime_uninit() function do the final rcu_barrier() instead. MFC after: 1 week Sponsored by: Mellanox Technologies
Notes
Notes: svn path=/head/; revision=314604
Diffstat (limited to 'sys/contrib/dev/acpica/components')
0 files changed, 0 insertions, 0 deletions