Tell GCC 4.1 to move unlikely() code to a separate section
In-Reply-To: <[email protected]>
Quoted 11 lines · Andi Kleen
Quoted 5 lines · Arjan van de Ven
This patch is more controversial I assume; it offers the option to use the gcc 4.1 option to move
unlikely()code to a separate section. On the con side, this means that longer byte sequences are needed to jump to this code, on the Pro side it means that theunlikely()code isn't sharing icache cachelines and tlbs anymore.I don't think this will do anything because the default
Makefilestill hasCFLAGS += -fno-reorder-blocks
This also won't work for functions that specify an explicit section name, e.g. __sched, __kprobes etc. -- at least that's what the gcc 4.0.2 docs say.
Signature · 2 lines
Chuck "Equations are the Devil's sentences." --Stephen Colbert