Re: [PATCH V6 4/6] x86/alternative: Batch of patch operations

Peter Zijlstra
2019-06-12T14:53:30Z

On Wed, Jun 12, 2019 at 11:57:29AM +0200, Daniel Bristot de Oliveira wrote:

> When a static key has more than one entry, these steps are called once for
> each entry. The number of IPIs then is linear with regard to the number 'n' of
> entries of a key: O(n*3), which is O(n).

> Doing the update in this way, the number of IPI becomes O(3) with regard
> to the number of keys, which is O(1).

That's not quite true, what you're doing is n/X, which, in the end, is
still O(n).

It just so happens your X is 128, and so any n smaller than that ends up
being 1.