Re: [patch 0/2] Immediate Values - jump patching update

From: H. Peter Anvin
Date: Sun May 04 2008 - 17:09:30 EST


Mathieu Desnoyers wrote:

Following your own suggestion, why don't we fix gcc and make it
interleave unlikely blocks less heavily with hot blocks ?


Doing this with compiler support is definitely The Right Thing, so I think this is the best way.

Furthermore, modern CPUs often speculatively fetch *both* branches of a conditional.

This is actually the biggest motivation for patching static branches.

Agreed. I'd like to find some info about which microarchitectures you
have in mind. Intel Core 2 ?

Not sure about Core 2, although Core 2 definitely can track down the wrong branch on a mispredict.

Let's fix gcc ! ;)

Sounds great :)

-hpa

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/