Commit Graph

12 Commits

Author SHA1 Message Date
mmacy
211029bcd0 epoch_test: fix compile
- update to new interface

Reported by:	manu
2018-07-15 00:31:17 +00:00
mmacy
a48d80f193 epoch(9): Make epochs non-preemptible by default
There are risks associated with waiting on a preemptible epoch section.
Change the name to make them not be the default and document the issue
under CAVEATS.

Reported by:	markj
2018-05-18 17:29:43 +00:00
mmacy
aac2a8081e epoch: add non-preemptible "critical" variant
adds:
- epoch_enter_critical() - can be called inside a different epoch,
  starts a section that will acquire any MTX_DEF mutexes or do
  anything that might sleep.
- epoch_exit_critical() - corresponding exit call
- epoch_wait_critical() - wait variant that is guaranteed that any
  threads in a section are running.
- epoch_global_critical - an epoch_wait_critical safe epoch instance

Requested by:   markj
Approved by:	sbruno
2018-05-18 01:52:51 +00:00
mmacy
2076e8aba5 Test priority handling in epoch test.
- Double the number of test threads to mp_ncpu*2
- Give each thread a different scheduling priority
2018-05-11 04:47:05 +00:00
mmacy
68b801ac97 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@
2018-05-10 17:55:24 +00:00
ngie
9c1e36f637 style(9): sort headers
MFC after:	3 weeks
Sponsored by:	Dell EMC Isilon
2017-05-09 05:08:47 +00:00
ngie
f04c823f4c style(9): sort headers and remove duplicates
MFC after:	3 weeks
Sponsored by:	Dell EMC Isilon
2017-05-09 04:54:29 +00:00
rrs
2d0289e25f Style 9 changes.
MFC after:	1 Month
2015-11-12 10:31:14 +00:00
kib
59e5487eee Fix UP build. 2015-11-12 09:20:10 +00:00
bdrewery
443f36fac2 Remove redundant declaration for sysctl kern.
This is trying to fix the GCC build.

MFC after:	1 month
X-MFC-With:	r290663
2015-11-11 16:24:52 +00:00
bdrewery
929c66051e Use a proper prototype.
This was a failure in the GCC build.

MFC after:	1 month
X-MFC-With:	r290663
2015-11-11 16:23:07 +00:00
rrs
3c24f04476 Add a kernel test framework. The callout_test is a demonstration and will only
work with the upcoming async-drain functionality. Tests can be added
to the tests directory and then the framework can be used to launch
those tests.

MFC after:	1 month
Sponsored by:	Netflix Inc.
Differential Revision:	https://reviews.freebsd.org/D1755
2015-11-10 14:14:41 +00:00