freebsd-dev/sys
Hans Petter Selasky 1f827dab9e 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
2017-03-03 16:28:03 +00:00
..
amd64 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
arm Add FPGA manager driver for Intel Arria 10. 2017-03-03 14:19:37 +00:00
arm64 Load the new sp_el0 with interrupts disabled in fork_trampoline. If an 2017-02-15 14:56:47 +00:00
boot loader.efi: reduce the size of the staging area if necessary 2017-03-02 07:25:50 +00:00
bsm
cam Add check missed in r314257. 2017-03-01 17:35:56 +00:00
cddl Fix null pointer dereference in zfs_freebsd_setacl(). 2017-03-02 23:23:28 +00:00
compat Update the LinuxKPI RCU and SRCU wrappers for the concurrency kit, CK. 2017-03-03 16:28:03 +00:00
conf Merge ^/head r314420 through r314481. 2017-03-01 08:22:51 +00:00
contrib Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
crypto Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
ddb Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
dev cxgbe/iw_cxgbe: Implement sq/rq drain operation. 2017-03-03 03:07:54 +00:00
fs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
gdb
geom The kern.geom.part.auto_resize should be tunable. 2017-02-28 20:51:20 +00:00
gnu Import latest vendor DTS files for Intel Arria 10. 2017-03-03 14:17:07 +00:00
i386 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
isa Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
kern kern_sig.c: ANSIfy and remove archaic register keyword 2017-03-02 22:17:53 +00:00
kgssapi
libkern strstr.c was inadvertently blasted with a copy of isa_nmi.c. Revert 2017-03-01 02:07:51 +00:00
mips Fix build: include machine/bus.h before uart.h 2017-03-02 17:09:14 +00:00
modules [intelspi][bytgio] Fix buildworld with MODULES_WITH_WORLD set 2017-03-02 03:19:39 +00:00
net Make gtaskqueue compatible with drm-next such that they can be used with the 2017-03-01 18:37:35 +00:00
net80211 net80211: fix ieee80211_htrateset setup, return EINVAL for an unsupported 2017-03-03 01:06:27 +00:00
netgraph mppc - Finish pluging NETGRAPH_MPPC_COMPRESSION. 2017-01-20 00:02:11 +00:00
netinet Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
netinet6 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
netipsec For translated packets do not adjust UDP checksum if it is zero. 2017-02-18 19:53:37 +00:00
netnatm
netpfil Fix NPTv6 rule counters when one_pass is not enabled. 2017-03-01 20:00:19 +00:00
netsmb
nfs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nfsclient Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nfsserver Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nlm
ofed Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
opencrypto
powerpc Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
riscv Implement atomic_fcmpset_*() for RISC-V. 2017-02-05 00:32:12 +00:00
rpc Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
security
sparc64 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
sys Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 2017-03-02 20:49:40 +00:00
teken
tests
tools Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ufs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
vm Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
x86 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
xdr
xen "Buses" is the preferred plural of "bus" 2017-01-15 17:54:01 +00:00
Makefile Remove pc98 support completely. 2017-01-28 02:22:15 +00:00