Skip to content

Immediate Values - jump patching update

Mathieu Desnoyers lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 19 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Immediate Values - jump livelinessarch/x86/kernel/immediate.c include/asm-generic/vmlinux.lds.h include/asm-powerpc/immediate.h +5 more+226 -1380 replies
2/2Markers - use imv_cond jump livelinessinclude/linux/marker.h+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 0/2] Immediate Values - jump patching update

Hi Ingo,

Here is the update to the jump patching optimization taking care of Peter's comments about register liveliness and instruction re-use by gcc optimizations. A good thing : it actually simplifies the code. Unfortunately, it adds 3 bytes to the instructions in i-cache because I now have to use a 5-bytes mov instruction so I can replace it with a 5-bytes jump. Therefore, 9 bytes are added to rather small functions (5-bytes mov + 2-bytes test + 2 bytes conditional branch) and 13 bytes are added to larger functions which needs a 6 bytes conditional branch at the branch site.

Instead of having to execute a sequence of nop, nop and jump, we now only have to execute the near jump, which jumps either at the address following the conditional branch or at the target address of the conditional branch, depending on the immediate value variable state.

Thanks to Peter for the review.

Those two patches apply on top of sched-devel.git.

Mathieu

Signature · 3 lines
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68