Messages in this thread | | | From | Michael Ellerman <> | Subject | Re: [PATCH v2 2/5] powerpc: module_[32|64].c: replace swap function with built-in one | Date | Mon, 01 Apr 2019 22:08:30 +1100 |
| |
Andrey Abramov <st5pub@yandex.ru> writes: > Replace relaswap with built-in one, because relaswap > does a simple byte to byte swap.
I replied to v1 with an ack, which stands, this is just a clarification.
> Since Spectre mitigations have made indirect function calls more > expensive, and the default simple byte copies swap is implemented > without them, an "optimized" custom swap function is now > a waste of time as well as code.
Spectre mitigations don't necessarily slow down indirect function calls on all arches or in all configurations on all arches, so that justification is a bit dubious.
That's not really a problem for this patch, because the existing overhead of the function call is probably already enough to rival the cost of the 24 byte copy.
cheers
| |