Add simple preempt safe epoch API
authormmacy <mmacy@FreeBSD.org>
Thu, 10 May 2018 17:55:24 +0000 (17:55 +0000)
committermmacy <mmacy@FreeBSD.org>
Thu, 10 May 2018 17:55:24 +0000 (17:55 +0000)
commit68b801ac97fcc94cc8ee7f70ebc464fd4bfcd90b
tree1da1c21da6bb2700c9d8dcf0a8eaebb5f492c38a
parenta2b0dc578d5907262dc3600ee1f0aea19559fcfa
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@
13 files changed:
contrib/bmake/job.c
sys/conf/files
sys/conf/kern.pre.mk
sys/kern/kern_malloc.c
sys/kern/kern_synch.c
sys/kern/subr_epoch.c [new file with mode: 0644]
sys/kern/subr_trap.c
sys/kern/subr_turnstile.c
sys/modules/epoch_test/Makefile [new file with mode: 0644]
sys/sys/epoch.h [new file with mode: 0644]
sys/sys/proc.h
sys/sys/turnstile.h
sys/tests/epoch/epoch_test.c [new file with mode: 0644]