]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Introduce __read_mostly and __exclusive_cache_line macros.
authormjg <mjg@FreeBSD.org>
Fri, 27 Jan 2017 14:53:09 +0000 (14:53 +0000)
committermjg <mjg@FreeBSD.org>
Fri, 27 Jan 2017 14:53:09 +0000 (14:53 +0000)
commit727e11df61cc0da44eed61387df507e525744d24
treeec797428e8b3e0e0f588dd2e8ef92b8e95e65077
parent3ac653a18af68057523f7383e9e1a389d49fead2
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
sys/compat/linuxkpi/common/include/linux/compiler.h
sys/conf/ldscript.amd64
sys/dev/drm2/drm_os_freebsd.h
sys/sys/systm.h