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)
Sun, Sep 29, 12:35 AM
Unknown Object (File)
Sat, Sep 7, 11:20 PM
Unknown Object (File)
Thu, Sep 5, 11:30 PM
Unknown Object (File)
Sat, Aug 31, 8:25 AM
Unknown Object (File)
Aug 23 2024, 7:54 AM
Unknown Object (File)
Aug 19 2024, 12:42 AM
Unknown Object (File)
Aug 19 2024, 12:00 AM
Unknown Object (File)
Aug 18 2024, 9:43 PM

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.