[lkml]   [2015]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [tip:x86/asm] x86: Pack function addresses tightly as well
On Fri, May 15, 2015 at 2:39 AM, tip-bot for Ingo Molnar
<> wrote:
> We can pack function addresses tightly as well:

So I really want to see performance numbers on a few
microarchitectures for this one in particular.

The kernel generally doesn't have loops (well, not the kinds of
high-rep loops that tend to be worth aligning), and I think the
general branch/loop alignment is likely fine. But the function
alignment doesn't tend to have the same kind of I$ advantages, it's
more lilely purely a size issue and not as interesting. Function
targets are also more likely to be not in the cache, I suspect, since
you don't have a loop priming it or a short forward jump that just got
the cacheline anyway. And then *not* aligning the function would
actually tend to make it *less* dense in the I$.

Put another way: I suspect this is more likely to hurt, and less
likely to help than the others.

Size matters, but size matters mainly from an I$ standpoint, not from
some absolute 'big is bad" issue. Also, even when size matters,
performance matters too. I do want performance numbers. Is this


 \ /
  Last update: 2015-05-15 20:41    [W:0.583 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site