mbox series

[mips-next,0/2] MIPS: optimize relocations processing

Message ID 20210116150126.20693-1-alobakin@pm.me (mailing list archive)
Headers show
Series MIPS: optimize relocations processing | expand

Message

Alexander Lobakin Jan. 16, 2021, 3:01 p.m. UTC
This series converts the logics of two main relocation functions,
one for relocatable kernel and one for modules, from the arrays of
handlers (callbacks) to plain switch-case functions, which allows
the compiler to greatly optimize the code, so the relocations will
be applied faster with lesser code size.

Tested on MIPS32 R2 with GCC 10.2 and LLVM 11.0 with -O2.

Alexander Lobakin (2):
  MIPS: module: optimize module relocations processing
  MIPS: relocatable: optimize the relocation process

 arch/mips/kernel/module.c   | 109 +++++++++++++++++-------------------
 arch/mips/kernel/relocate.c |  54 ++++++++++--------
 2 files changed, 82 insertions(+), 81 deletions(-)

Comments

Thomas Bogendoerfer Jan. 18, 2021, 2:57 p.m. UTC | #1
On Sat, Jan 16, 2021 at 03:01:57PM +0000, Alexander Lobakin wrote:
> This series converts the logics of two main relocation functions,
> one for relocatable kernel and one for modules, from the arrays of
> handlers (callbacks) to plain switch-case functions, which allows
> the compiler to greatly optimize the code, so the relocations will
> be applied faster with lesser code size.
> 
> Tested on MIPS32 R2 with GCC 10.2 and LLVM 11.0 with -O2.
> 
> Alexander Lobakin (2):
>   MIPS: module: optimize module relocations processing
>   MIPS: relocatable: optimize the relocation process
> 
>  arch/mips/kernel/module.c   | 109 +++++++++++++++++-------------------
>  arch/mips/kernel/relocate.c |  54 ++++++++++--------
>  2 files changed, 82 insertions(+), 81 deletions(-)

series applied to mips-next.

Thomas.