Skip to content

Kill the time spent in patch_instruction()

Christophe Leroy linuxppc-dev lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4powerpc/code-patching: Don't call is_vmalloc_or_module_addr() without CONFIG_MODULESarch/powerpc/lib/code-patching.c+1 -10 replies
2/4powerpc/code-patching: Speed up page mapping/unmappingarch/powerpc/lib/code-patching.c+16 -110 replies
3/4powerpc/code-patching: Use jump_label for testing freed initmemarch/powerpc/include/asm/code-patching.h arch/powerpc/lib/code-patching.c arch/powerpc/mm/mem.c+8 -14 replies
4/4powerpc/code-patching: Use jump_label to check if poking_init() is donearch/powerpc/lib/code-patching.c+4 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/4] Kill the time spent in patch_instruction()

This series reduces by 70% the time required to activate ftrace on an 8xx with CONFIG_STRICT_KERNEL_RWX.

Measure is performed in function ftrace_replace_code() using mftb() around the loop.

With the series,
- Without CONFIG_STRICT_KERNEL_RWX, 416000 TB ticks are measured.
- With CONFIG_STRICT_KERNEL_RWX, 546000 TB ticks are measured.

Before this series,
- Without CONFIG_STRICT_KERNEL_RWX, 427000 TB ticks are measured.
- With CONFIG_STRICT_KERNEL_RWX, 1744000 TB ticks are measured.

Before the series, CONFIG_STRICT_KERNEL_RWX multiplies the time required for ftrace activation by more than 4.

With the series, CONFIG_STRICT_KERNEL_RWX increases the time required for ftrace activation by only 30%

Christophe Leroy (4):
powerpc/code-patching: Don't call is_vmalloc_or_module_addr() without
CONFIG_MODULES
powerpc/code-patching: Speed up page mapping/unmapping powerpc/code-patching: Use jump_label for testing freed initmem powerpc/code-patching: Use jump_label to check if poking_init() is
done

 arch/powerpc/include/asm/code-patching.h |  2 ++
 arch/powerpc/lib/code-patching.c         | 37 +++++++++++++++---------
 arch/powerpc/mm/mem.c                    |  2 ++
 3 files changed, 28 insertions(+), 13 deletions(-)
Signature · 1 line
2.35.1