HomeFreeBSD

geom: create an API to allocate events, and use that storage to send them

Description

geom: create an API to allocate events, and use that storage to send them

g_alloc_event will allocate storage for an opaque event. g_post_event_ep
can use memory returned by g_alloc_event to send an event from a context
that might not be able to allocate the event. Occasionally, we can
alloate memory when we create an object, but not while we're destroy
it. This allows one to allocate at creation time memory to use when
destorying the object.

Reviewed by: jhb
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D30544

(cherry picked from commit 380710a5c8c1fd638ec961351b75b667e91667c9)

Details

Provenance
impAuthored on Jul 23 2021, 9:16 PM
Reviewer
jhb
Differential Revision
D30544: geom_disk: use a preallocated geom_event for disk destruction.
Parents
rGc43e14590772: kqueue: drain kqueue taskqueue if syscall tickled it
Branches
Unknown
Tags
Unknown