Re: [PATCH 01/13] static_call: Index code text reservation lookups

From
Peter Zijlstra <peterz@infradead.org>
Date
2026-11-12 10:11:14
Also in
bpf, lkml
Reply to
Peter Zijlstra, 2026-11-12
On Thu, Nov 12, 2026 at 10:07:34AM +0100, Peter Zijlstra wrote:
Looking at this in a little more detail; I'm confused. 

You're literally adding an index, so that you can find the
static_call_size, while all you really need is static_call_addr().
/size/site/ obviously :-)
That is, you could have just created an array of relocated site->addr
and sorted that, that would safe you a ton of indirection all around.

That is:

	index->entries[i] = (long)static_call_addr(start + i) - (long)&index->entries[i];
Should be:

 	index->entries[i] = (long)static_call_addr(start + i) - (long)index->entries;

They have to all be relative to one location in order for sorting to
make sense.
That will make your lookup take at least half the amount of loads.


Also, you really should support modules, there is no point being fast
until you load a module.
Thread (34 messages) 34 messages, 6 authors, last reply 4d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help