HomeFreeBSD

uma: UMA_ALIGN_CACHE: Resolve the proper value at use point

Description

uma: UMA_ALIGN_CACHE: Resolve the proper value at use point

Having a special value of -1 that is resolved internally to
'uma_align_cache' provides no significant advantages and prevents
changing that variable to an unsigned type, which is natural for an
alignment mask. So suppress it and replace its use with a call to
uma_get_align_mask(). The small overhead of the added function call is
irrelevant since UMA_ALIGN_CACHE is only used when creating new zones,
which is not performance critical.

Reviewed by: markj, kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42259

(cherry picked from commit e557eafe7233f8231c1f5f5b098e4bab8e818645)

Approved by: markj (mentor)

Details

Provenance
olceAuthored on Oct 13 2023, 12:13 PM
Reviewer
markj
Differential Revision
D42259: uma: UMA_ALIGN_CACHE: Resolve the proper value at use point
Parents
rG56c53cc8fb3e: uma: Hide 'uma_align_cache'; Create/rename accessors
Branches
Unknown
Tags
Unknown