Re: [PATCH v3 0/6] Static calls
From: Andy Lutomirski
Date: Fri Jan 11 2019 - 16:05:36 EST
On Fri, Jan 11, 2019 at 12:54 PM Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Fri, Jan 11, 2019 at 12:31 PM Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
> >
> > I was referring to the fact that a single static call key update will
> > usually result in patching multiple call sites. But you're right, it's
> > only 1-2 trampolines per text_poke_bp() invocation. Though eventually
> > we may want to batch all the writes like what Daniel has proposed for
> > jump labels, to reduce IPIs.
>
> Yeah, my suggestion doesn't allow for batching, since it would
> basically generate one trampoline for every rewritten instruction.
Sure it does. Just make 1000 trampolines and patch 1000 sites in a
batch :) As long as the number of trampolines is smallish (e.g. fits
in a page), then we should be in good shape.