HomeFreeBSD

Introduce __read_mostly and __exclusive_cache_line macros.

Description

Introduce read_mostly and exclusive_cache_line macros.

The intended use is to annotate frequently used globals which either rarely
change (and thus can be grouped in the same cacheline) or are an atomic counter
(which means it may benefit from being the only variable in the cacheline).

Linker script support is provided only for amd64. Architectures without it risk
having other variables put in, i.e. as if they were not annotated. This is
harmless from correctness point of view.

Reviewed by: bde (previous version)
MFC after: 1 month

Details

Provenance
mjgAuthored on
Parents
rS312887: Hide unneeded message under bootverbose.
Branches
Unknown
Tags
Unknown