]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
LinuxKPI: Allow kmem_cache_free() to be called from critical sections
authorVladimir Kondratyev <wulf@FreeBSD.org>
Mon, 5 Jul 2021 00:18:14 +0000 (03:18 +0300)
committerVladimir Kondratyev <wulf@FreeBSD.org>
Mon, 5 Jul 2021 00:18:14 +0000 (03:18 +0300)
commita2b83b59db365255461a50ff8fa5e5e4e92e4d51
tree383b776708c430087968fd09532219552a5f97a0
parent4060e77f49d1b9fd2254f3f4da94fd64fce83f72
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
sys/compat/linuxkpi/common/include/linux/slab.h
sys/compat/linuxkpi/common/src/linux_rcu.c
sys/compat/linuxkpi/common/src/linux_slab.c