lkml.org 
[lkml]   [2011]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RFC V2 3/5] jump_label: if a key has already been initialized, don't nop it out
From
Date
On Thu, 2011-10-06 at 11:50 -0700, Richard Henderson wrote:
> On 10/06/2011 11:26 AM, Steven Rostedt wrote:
>
> >
> > That jmp to l_yes should easily be a two byte jump.
>
> Until the compiler decides to re-order the code. That's the problem --
> in the general case you do not know how far away the destination is really
> going to be.

Yeah, I was discussing this with Peter Zijlstra on IRC.

>
> There are a couple of possibilities for improvement:
>
> (1) Do as Jason suggests above and let the assembler figure out the size
> of the branch that is needed. Without adding more data to __jump_table,
> you'll want to be extremely careful about checking the two pointers to
> see what size branch has been installed.

Yeah, that could be done at patch time.


>
> (2) Always reserve 5 bytes of space, but if the distance is small enough
> patch in a 2-byte jump. That doesn't help with the icache footprint.

I don't think this one is worth it.

-- Steve



\
 
 \ /
  Last update: 2011-10-06 21:31    [W:0.089 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site