[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 02/70] xen/sort: Switch to an extern inline implementation
Hi, On 14/02/2022 12:50, Andrew Cooper wrote: There are exactly 3 callers of sort() in the hypervisor. Callbacks in a tight loop like this are problematic for performance, especially with Spectre v2 protections, which is why extern inline is used commonly by libraries. Both ARM callers pass in NULL for the swap function, and while this might seem like an attractive option at first, it causes generic_swap() to be used, which forced a byte-wise copy. Provide real swap functions so the compiler can optimise properly, which is very important for ARM downstreams where milliseconds until the system is up matters. Did you actually benchmark it? Both those lists will have < 128 elements in them. So I would be extremely surprised if you save more than a few hundreds microseconds with this approach. So, my opinion on this approach hasn't changed. On v1, we discussed an approach that would suit both Stefano and I. Jan seemed to confirm that would also suit x86. Therefore, for this approach: Nacked-by: Julien Grall <jgrall@xxxxxxxxxx> Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |