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)
Mon, May 20, 8:19 PM
Unknown Object (File)
Mon, May 20, 8:00 PM
Unknown Object (File)
Mon, May 20, 7:49 PM
Unknown Object (File)
Mon, May 20, 7:42 PM
Unknown Object (File)
Mon, May 20, 7:11 PM
Unknown Object (File)
Mon, May 20, 7:30 AM
Unknown Object (File)
Wed, May 15, 1:25 PM
Unknown Object (File)
Jan 1 2024, 11:38 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 39901
Build 36790: arc lint + arc unit

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
208

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
208

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.