HomeFreeBSD

For not offpage zones the slab is placed at the end of page. Keg's uk_pgoff

Description

For not offpage zones the slab is placed at the end of page. Keg's uk_pgoff
is calculated to guarantee that struct uma_slab is placed at pointer size
alignment. Calculation of real struct uma_slab size is done in keg_ctor()
and yet again in keg_large_init(), to check if we need an extra page. This
calculation can actually be performed at compile time.

  • Add SIZEOF_UMA_SLAB macro to calculate size of struct uma_slab placed at an end of a page with alignment requirement.
  • Use SIZEOF_UMA_SLAB in keg_ctor() and in keg_large_init(). This is a not a functional change.
  • Use SIZEOF_UMA_SLAB in UMA_SLAB_SPACE definition and in keg_small_init(). This is a potential bugfix, but in reality I don't think there are any systems affected, since compiler aligns struct uma_slab anyway.

Details

Provenance
glebiusAuthored on
Parents
rS341161: MFC r339506, r339508, r340064 (by markj), r340546 (by alc):
Branches
Unknown
Tags
Unknown