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
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42259

Details

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