]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Implement API for draining EPOCH(9) callbacks.
authorhselasky <hselasky@FreeBSD.org>
Fri, 28 Jun 2019 10:38:56 +0000 (10:38 +0000)
committerhselasky <hselasky@FreeBSD.org>
Fri, 28 Jun 2019 10:38:56 +0000 (10:38 +0000)
commit9586d860bbc0e7afa11499bd12d30f6444c12015
tree76f30611ca695d90f05a3cb5113b7878c3e4544f
parent5fdffd8987d7c831ea25fb622b64927cdc960ad2
Implement API for draining EPOCH(9) callbacks.

The epoch_drain_callbacks() function is used to drain all pending
callbacks which have been invoked by prior epoch_call() function calls
on the same epoch. This function is useful when there are shared
memory structure(s) referred to by the epoch callback(s) which are not
refcounted and are rarely freed. The typical place for calling this
function is right before freeing or invalidating the shared
resource(s) used by the epoch callback(s). This function can sleep and
is not optimized for performance.

Differential Revision: https://reviews.freebsd.org/D20109
MFC after: 1 week
Sponsored by: Mellanox Technologies
share/man/man9/Makefile
share/man/man9/epoch.9
sys/kern/subr_epoch.c
sys/sys/epoch.h