Page MenuHomeFreeBSD

uma: Opportunistically embed slab headers within vm_page structures
Needs ReviewPublic

Authored by markj on Mon, Jun 2, 1:51 AM.
Tags
None
Referenced Files
F119738905: D50641.id156396.diff
Wed, Jun 11, 5:42 PM
Unknown Object (File)
Mon, Jun 9, 5:42 AM
Unknown Object (File)
Sun, Jun 8, 12:46 AM
Unknown Object (File)
Fri, Jun 6, 1:08 AM
Unknown Object (File)
Fri, Jun 6, 1:08 AM
Unknown Object (File)
Fri, Jun 6, 1:08 AM
Unknown Object (File)
Fri, Jun 6, 1:08 AM
Unknown Object (File)
Fri, Jun 6, 1:08 AM
Subscribers
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

This gives better efficiency for item sizes smaller than a page but
significantly larger than the slab header size. In particular, without
this patch, for every ZFS ABD chunk we allocate an 80 bytes slab header,
effectively a 2% tax on the ARC. With this patch we don't need to
allocate any extra memory.

One downside of the implementation is that this layout can't be used for
malloc(9) zones, which need to store extra metadata in plinks so that
free(9) can find the right zone. I think we can compress that metadata
somehow, e.g., instead of storing a pointer to the malloc zone, store
the corresponding kmemzones[] index in the oflags field, but I didn't
try to implement it.

With INVARIANTS disabled, we have 12 bytes available for slab bitmaps;
with INVARIANTS enabled, we have 4 bytes available. In a
GENERIC-NODEBUG kernel with 240 zones, 142 of them use the new layout.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 64584
Build 61468: arc lint + arc unit