[PATCH 2/5] powerpc: module_[32|64].c: replace swap function with built-in one

Andrey Abramov st5pub at yandex.ru
Wed Apr 3 06:11:19 AEDT 2019


01.04.2019, 13:11, "Michael Ellerman" <mpe at ellerman.id.au>:
> This looks OK. It's a bit of a pity to replace the 8-byte-at-a-time copy
> with a byte-at-a-time copy, but I suspect it's insignificant compared to
> the overhead of calling the comparison and swap functions.
>
> And we could always add a generic 8-byte-at-a-time swap function if it's
> a bottleneck.

I am sorry, I forgot to quickly comment on your letter.
Now (after George Spelvin's patches) the generic swap is able
to use u64 or u32 if the alignment and size are divisible
by 4 or 8, so we lose nothing here.


More information about the Linuxppc-dev mailing list