linux_dsm_epyc7002/arch/powerpc/boot
Joel Stanley 747b217608 powerpc/boot: Build boot wrapper with optimisations
The boot wrapper is currently built with -Os. By building with O2 we
can meaningfully reduce the time decompressing the kernel.

I tested by comparing 10 runs of each option in Qemu and on hardware.
The kernel is compressed with KERNEL_XZ built with GCC 8.2.0-7ubuntu1.
The values are counts of the timebase.

Qemu TCG powernv Power8:

              Os            O2            O3
 median       10221123889   6201518438    6568186825
 stddev        1361267211    429090641     657930076
 improvement                    39.33%        35.74%

Palmetto Power8:

              Os            O2            O3
 median           50279         50599          35790
 stddev       992144533     627130655      623721078
 improvement                   36.79%         37.13%

Romulus Power9:

              Os            O2            O3
 median       670312391     454733720      448881398
 stddev          157569        107276         108760
 improvement                   32.16%         33.03%

TCG was quite noisy, with every few runs producing an outlier. Even so,
O2 is faster than O3. On hardware the numbers were less noisy and O3 is
slightly faster than O2.

The wrapper size increases when moving from Os. Comparing zImage.epapr
to the existing Os build using bloat-o-meter:

  Before=43401, After=56837 (13KB), chg +30.96%
  Before=43401, After=64305 (20KB), chg +48.16%

I chose O2 for a balance between Qemu and hardware speed up.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-10-13 22:21:25 +11:00
..
dts
.gitignore powerpc/boot: Expose Kconfig symbols to wrapper 2018-10-13 22:21:25 +11:00
4xx.c
4xx.h
44x.h
addnote.c
bamboo.c
cpm-serial.c
crt0.S
crtsavres.S
cuboot-8xx.c
cuboot-52xx.c
cuboot-83xx.c
cuboot-85xx-cpm2.c
cuboot-85xx.c
cuboot-824x.c
cuboot-acadia.c
cuboot-amigaone.c
cuboot-bamboo.c
cuboot-ebony.c
cuboot-hotfoot.c
cuboot-katmai.c
cuboot-kilauea.c
cuboot-mpc7448hpc2.c
cuboot-pq2.c
cuboot-rainier.c
cuboot-sam440ep.c
cuboot-sequoia.c
cuboot-taishan.c
cuboot-warp.c
cuboot-yosemite.c
cuboot.c
cuboot.h
dcr.h
decompress.c
devtree.c
div64.S
dummy.c
ebony.c
elf_util.c
elf.h
ep88xc.c
ep405.c
ep8248e.c
epapr-wrapper.c
epapr.c
fixed-head.S
fixup-headers.sed
fsl-soc.c
fsl-soc.h
gamecube-head.S
gamecube.c
hack-coff.c
holly.c
install.sh
io.h
libfdt_env.h
libfdt-wrapper.c
main.c
Makefile powerpc/boot: Build boot wrapper with optimisations 2018-10-13 22:21:25 +11:00
mktree.c
motload-head.S
mpc8xx.c
mpc8xx.h
mpc52xx-psc.c
mvme5100.c
mvme7100.c
ns16550.c
of.c
of.h
ofconsole.c
oflib.c
opal-calls.S
opal.c powerpc/boot: Fix opal console in boot wrapper 2018-10-13 22:21:25 +11:00
ops.h
page.h
planetcore.c
planetcore.h
ppc_asm.h
ppcboot-hotfoot.h
ppcboot.h
pq2.c
pq2.h
ps3-head.S
ps3-hvcall.S
ps3.c
pseries-head.S
README
redboot-8xx.c
redboot-83xx.c
redboot.h
reg.h
rs6000.h
serial.c powerpc/boot: Expose Kconfig symbols to wrapper 2018-10-13 22:21:25 +11:00
simple_alloc.c
simpleboot.c
stdbool.h
stdint.h
stdio.c
stdio.h
stdlib.c
stdlib.h
string.h
string.S
swab.h
treeboot-akebono.c
treeboot-bamboo.c
treeboot-currituck.c
treeboot-ebony.c
treeboot-iss4xx.c
treeboot-walnut.c
types.h
uartlite.c
ugecon.c
ugecon.h
util.S
virtex405-head.S
virtex.c
wii-head.S
wii.c
wrapper
xz_config.h
zImage.coff.lds.S
zImage.lds.S
zImage.ps3.lds.S

To extract the kernel vmlinux, System.map, .config or initrd from the zImage binary:

objcopy -j .kernel:vmlinux -O binary zImage vmlinux.gz
objcopy -j .kernel:System.map -O binary zImage System.map.gz
objcopy -j .kernel:.config -O binary zImage config.gz
objcopy -j .kernel:initrd -O binary zImage.initrd initrd.gz


	Peter