linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: kernel: module PLT optimizations
@ 2016-08-16 15:51 Ard Biesheuvel
  2016-08-16 15:51 ` [PATCH 1/2] ARM: kernel: merge core and init PLTs Ard Biesheuvel
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2016-08-16 15:51 UTC (permalink / raw)
  To: linux-arm-kernel

As reported by Jongsung, the O(n^2) search in the PLT allocation code may
disproportionately affect module load time for modules with a larger number
of relocations.

Since the existing routines rather naively take branch instructions into
account that are internal to the module, we can improve the situation
significantly by checking the symbol section index first, and disregarding
symbols that are defined in the same module.

Patch #1 merge the core and init PLTs, since the latter is virtually empty
anyway.

Patch #2 implements the optimization to only take SHN_UNDEF symbols into
account.

Ard Biesheuvel (2):
  ARM: kernel: merge core and init PLTs
  ARM: kernel: allocate PLT entries only for external symbols

 arch/arm/include/asm/module.h |   6 +-
 arch/arm/kernel/module-plts.c | 100 ++++++++++----------
 arch/arm/kernel/module.lds    |   3 +-
 3 files changed, 53 insertions(+), 56 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-08-17 11:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-16 15:51 [PATCH 0/2] ARM: kernel: module PLT optimizations Ard Biesheuvel
2016-08-16 15:51 ` [PATCH 1/2] ARM: kernel: merge core and init PLTs Ard Biesheuvel
2016-08-16 15:51 ` [PATCH 2/2] ARM: kernel: allocate PLT entries only for external symbols Ard Biesheuvel
2016-08-17 11:06 ` [PATCH 0/2] ARM: kernel: module PLT optimizations Dave Martin
2016-08-17 11:10   ` Ard Biesheuvel

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