commit 74b717d93fd99fc8fefd98c6710c225c1be74363 Author: Ryota Ozaki Date: Thu Sep 1 15:38:40 2016 +0900 Add -falign-functions=16 to amd64 kernels This option aligns the start of functions by 16 bytes, which reduces performance fluctuations by small, unrelated changes. diff --git a/sys/arch/amd64/conf/Makefile.amd64 b/sys/arch/amd64/conf/Makefile.amd64 index c1455c1..af748f2 100644 --- a/sys/arch/amd64/conf/Makefile.amd64 +++ b/sys/arch/amd64/conf/Makefile.amd64 @@ -42,6 +42,9 @@ CFLAGS+= -mno-red-zone -mno-mmx -mno-sse -mno-avx CFLAGS+= -msoft-float # For gcc we might need this, but other compilers barf # CFLAGS+= -mno-fp-ret-in-387 +# Prevent the start of functions from varying by small, unrelated changes; +# the variation causes performance fluctuations. +CFLAGS+= -falign-functions=16 ## ## (3) libkern and compat