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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Mathieu Desnoyers <mathieu.desnoyers@...>
Cc: Ingo Molnar <mingo@...>, <akpm@...>, <linux-kernel@...>, Frank Ch. Eigler <fche@...>
Date: Tuesday, April 29, 2008 - 11:35 am

Mathieu Desnoyers wrote:

Obviously doing this by hand is insane.  That was not my thought.


That's funny, given that's exactly what you have now.

DWARF information is the way you get this stuff out of the compiler. 
That is what it's *there for*.  If you don't want to keep it around you 
can distill out the information you need and then remove it.  However, 
as I have said about six times now:

THE RIGHT WAY TO DO THIS IS WITH COMPILER SUPPORT.

All these problems is because you're trying to do something behind the 
back of the compiler, but not *completely* so.


This is somewhat nice in theory; I've found that gcc tends to interlace 
them pretty heavily and so the cache interference even of gcc "out of 
line" code is sizable.  Furthermore, modern CPUs often speculatively 
fetch *both* branches of a conditional.

This is actually the biggest motivation for patching static branches.


Nice theory.  Doesn't work in practice as long as you rely on gcc unlikey().

	-hpa
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 0/2] Immediate Values - jump patching update, Mathieu Desnoyers, (Sun Apr 27, 11:34 pm)
Re: [patch 0/2] Immediate Values - jump patching update, H. Peter Anvin, (Mon Apr 28, 1:21 pm)
Re: [patch 0/2] Immediate Values - jump patching update, H. Peter Anvin, (Mon Apr 28, 5:03 pm)
Re: [patch 0/2] Immediate Values - jump patching update, H. Peter Anvin, (Mon Apr 28, 6:25 pm)
Re: [patch 0/2] Immediate Values - jump patching update, H. Peter Anvin, (Mon Apr 28, 7:06 pm)
Re: [patch 0/2] Immediate Values - jump patching update, Mathieu Desnoyers, (Mon Apr 28, 9:46 pm)
Re: [patch 0/2] Immediate Values - jump patching update, H. Peter Anvin, (Mon Apr 28, 10:07 pm)
Re: [patch 0/2] Immediate Values - jump patching update, Mathieu Desnoyers, (Tue Apr 29, 8:18 am)
Re: [patch 0/2] Immediate Values - jump patching update, H. Peter Anvin, (Tue Apr 29, 11:35 am)
Re: [patch 0/2] Immediate Values - jump patching update, Mathieu Desnoyers, (Sun May 4, 10:54 am)
Re: [patch 0/2] Immediate Values - jump patching update, H. Peter Anvin, (Sun May 4, 5:05 pm)
Re: [patch 0/2] Immediate Values - jump patching update, Frank Ch. Eigler, (Mon Apr 28, 8:47 pm)
Re: [patch 0/2] Immediate Values - jump patching update, H. Peter Anvin, (Mon Apr 28, 9:08 pm)
Re: [patch 0/2] Immediate Values - jump patching update, Pavel Machek, (Wed May 14, 10:53 am)
Re: [patch 0/2] Immediate Values - jump patching update, Mathieu Desnoyers, (Mon Apr 28, 10:35 am)