login
Header Space

 
 

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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <akpm@...>, Ingo Molnar <mingo@...>, <linux-kernel@...>, H. Peter Anvin <hpa@...>
Date: Sunday, April 27, 2008 - 11:34 pm

Hi Ingo,

Here is the update to the jump patching optimization taking care of Peter's
comments about register liveliness and instruction re-use by gcc optimizations.
A good thing : it actually simplifies the code. Unfortunately, it adds 3 bytes
to the instructions in i-cache because I now have to use a 5-bytes mov
instruction so I can replace it with a 5-bytes jump. Therefore, 9 bytes are
added to rather small functions (5-bytes mov + 2-bytes test + 2 bytes
conditional branch) and 13 bytes are added to larger functions which needs a 6
bytes conditional branch at the branch site.

Instead of having to execute a sequence of nop, nop and jump, we now only have
to execute the near jump, which jumps either at the address following the
conditional branch or at the target address of the conditional branch, depending
on the immediate value variable state.

Thanks to Peter for the review.

Those two patches apply on top of sched-devel.git.

Mathieu

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
--
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)
speck-geostationary