linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Lobakin <alobakin@pm.me>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Nathan Chancellor <natechancellor@gmail.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Kees Cook <keescook@chromium.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mike Rapoport <rppt@kernel.org>,
	Alexander Lobakin <alobakin@pm.me>,
	Jinyang He <hejinyang@loongson.cn>,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH mips-next 0/2] MIPS: optimize relocations processing
Date: Sat, 16 Jan 2021 15:01:57 +0000	[thread overview]
Message-ID: <20210116150126.20693-1-alobakin@pm.me> (raw)

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(-)

-- 
2.30.0



             reply	other threads:[~2021-01-16 17:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-16 15:01 Alexander Lobakin [this message]
2021-01-16 15:02 ` [PATCH mips-next 1/2] MIPS: module: optimize module relocations processing Alexander Lobakin
2021-01-16 15:02   ` [PATCH mips-next 2/2] MIPS: relocatable: optimize the relocation process Alexander Lobakin
2021-01-18  1:49   ` [PATCH mips-next 1/2] MIPS: module: optimize module relocations processing Jiaxun Yang
2021-01-18 14:57 ` [PATCH mips-next 0/2] MIPS: optimize " Thomas Bogendoerfer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210116150126.20693-1-alobakin@pm.me \
    --to=alobakin@pm.me \
    --cc=akpm@linux-foundation.org \
    --cc=hejinyang@loongson.cn \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=rppt@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).