HomeFreeBSD

LinuxKPI: Allow kmem_cache_free() to be called from critical sections

Description

LinuxKPI: Allow kmem_cache_free() to be called from critical sections

as it is required by i915kms driver from Linux kernel v 5.5.
This is done with asynchronous freeing of requested memory areas from
taskqueue thread. As memory to be freed is reused to store linked list
entry, backing UMA zone item size is rounded up to pointer size.

While here, make struct linux_kmem_cache private to LKPI to reduce amount
of BSD headers included by linux/slab.h and switch RCU code to usage of
LKPI's linux_irq_work_tq taskqueue to avoid injection of current into
system-wide taskqueue_fast thread context.

Submitted by: nc (initial version for drm-kmod)
Reviewed by: manu, nc
Differential revision: https://reviews.freebsd.org/D30760

(cherry picked from commit a2b83b59db365255461a50ff8fa5e5e4e92e4d51)

Details

Provenance
wulfAuthored on Jul 5 2021, 12:18 AM
Reviewer
manu
Differential Revision
D30760: LinuxKPI: Allow kmem_cache_free() to be called from critical sections
Parents
rG0daba7847e2e: tcpdump: decode packets on pfsync interfaces
Branches
Unknown
Tags
Unknown