Re: [PATCH 0/4] irqchip/gic-v3-its: free_lpi_range tweaks

From: Marc Zyngier
Date: Tue Mar 12 2019 - 14:03:20 EST


Hi Rasmus,

On 12/03/2019 17:33, Rasmus Villemoes wrote:
> I noticed that the O(n log n) behaviour of free_lpi_range could easily
> be made O(n) (patch 4), though I don't suppose n is ever large enough
> to actually matter. While there, I also stumbled on two other
> micro-optimizations (2 and 3).

n is usually in the range 1 .. nr_cpus, so pretty small, even on the
biggest machines we have around (256 threads). And actually, nobody ever
frees LPIs, because hey, why would you?

> Then while writing the commit log for the last patch, I noticed that
> the cmp callback I was removing was actually buggy, so I went back and
> added a patch in front suitable for -stable. I'll leave it to others
> to decide if it's important enough for that.

Thanks for that. I'll have a look at the whole thing anyway (I've just
glanced over it so far).

> Please note that this is only compile-tested.

Right, this needs some actual testing then. /me needs to build a guest
that shakes the allocator a bit.

Cheers,

M.
--
Jazz is not dead. It just smells funny...