HomeFreeBSD

uma: Permit specifying max of cache line and some custom alignment

Description

uma: Permit specifying max of cache line and some custom alignment

To be used for structures for which we want to enforce that pointers to
them have some number of lower bits always set to 0, while still
ensuring we benefit from cache line alignment to avoid false sharing
between structures and fields within the structures (provided they are
properly ordered).

First candidate consumer that comes to mind is 'struct thread', see next
commit.

Reviewed by: markj, kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42265

Details

Provenance
olceAuthored on Oct 13 2023, 3:05 PM
markjCommitted on Nov 2 2023, 1:30 PM
Reviewer
markj
Differential Revision
D42265: uma: Permit specifying max of cache line and some custom alignment
Parents
rG2c7dd66d09a1: linuxkpi: dma_get_cache_alignment(): Fix off-by-one result
Branches
Unknown
Tags
Unknown