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

(cherry picked from commit 733e0abd2897289e2acf70f7c72e31a5a560394a)

Details

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