Page MenuHomeFreeBSD

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

Authored by wulf on Jun 13 2021, 10:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 1 2024, 11:38 AM
Unknown Object (File)
Dec 20 2023, 7:53 AM
Unknown Object (File)
Dec 12 2023, 4:46 PM
Unknown Object (File)
Nov 15 2023, 11:20 PM
Unknown Object (File)
Oct 25 2023, 1:34 AM
Unknown Object (File)
Oct 14 2023, 4:57 AM
Unknown Object (File)
Sep 2 2023, 11:31 AM
Unknown Object (File)
Aug 16 2023, 10:06 AM

Details

Summary

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)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

wulf requested review of this revision.Jun 13 2021, 10:53 PM

LGTM.

However since I'm technically a "Ports" committer (and far from a kernel expert, though hopefully getting there), I'd recommend waiting for approval from @hselasky and/or @manu.

This revision is now accepted and ready to land.Jun 14 2021, 12:20 AM

Not tested but looks good to me.

sys/compat/linuxkpi/common/include/linux/slab.h
209

This function must be prefixed lkpi_xxx() and a wrapper macro is needed.

This revision now requires review to proceed.Jun 14 2021, 11:25 PM
wulf added inline comments.
sys/compat/linuxkpi/common/include/linux/slab.h
209

This function must be prefixed lkpi_xxx() and a wrapper macro is needed.

Done

This revision was not accepted when it landed; it landed in state Needs Review.Jul 5 2021, 12:24 AM
This revision was automatically updated to reflect the committed changes.
wulf marked an inline comment as done.