mbox series

[RESEND,0/3] Build ORC fast lookup table in scripts/sorttable tool

Message ID 20200723034643.33537-1-changhuaixin@linux.alibaba.com (mailing list archive)
Headers show
Series Build ORC fast lookup table in scripts/sorttable tool | expand

Message

changhuaixin July 23, 2020, 3:46 a.m. UTC
Move building of fast lookup table from boot to sorttable tool. This saves us
6380us boot time on Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz with cores. It
adds a little more than 7ms to boot time when testing on the same CPU.

Kernel initialization unwind_init() cannot be removed because lookup_num_blocks
is still needed.

Huaixin Chang (3):
  scripts/sorttable: Change section type of orc_lookup to SHT_PROGBITS
  scripts/sorttable: Build orc fast lookup table via sorttable tool
  x86/unwind/orc: Simplify unwind_init() for x86 boot

 arch/x86/kernel/unwind_orc.c      | 41 +---------------
 include/asm-generic/vmlinux.lds.h |  2 +
 scripts/sorttable.h               | 99 ++++++++++++++++++++++++++++++++++++---
 3 files changed, 96 insertions(+), 46 deletions(-)

Comments

changhuaixin Aug. 7, 2020, 4:17 a.m. UTC | #1
Move building of fast lookup table from boot to sorttable tool. This saves us
6380us boot time on Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz with cores. It
adds a little more than 7ms to boot time when testing on the same CPU.

Changelog v2:
1. Write .orc_lookup section header via objtool
2. Move two ORC lookup table macro from orc_lookup.h into orc_types.h
3. Spell 'ORC' in capitalized fashion

Huaixin Chang (3):
  objtool: Write .orc_lookup section header
  scripts/sorttable: Build ORC fast lookup table via sorttable tool
  x86/unwind/orc: Simplify unwind_init() for x86 boot

 arch/x86/include/asm/orc_lookup.h      | 16 ------
 arch/x86/include/asm/orc_types.h       | 16 ++++++
 arch/x86/kernel/unwind_orc.c           | 41 +--------------
 arch/x86/kernel/vmlinux.lds.S          |  2 +-
 scripts/sorttable.h                    | 96 +++++++++++++++++++++++++++++++---
 tools/arch/x86/include/asm/orc_types.h | 16 ++++++
 tools/objtool/orc_gen.c                |  4 ++
 7 files changed, 128 insertions(+), 63 deletions(-)
changhuaixin Aug. 19, 2020, 3:03 a.m. UTC | #2
Hi,Ingo

This patchset reverts the hacks from patchset v1. Also it includes some other fixes upon v1 as suggested.
Will you please have a look at this?

The previous links are:
https://lore.kernel.org/lkml/20200724135531.GB648324@gmail.com/

Thanks,
huaixin

> On Aug 7, 2020, at 12:17 PM, Huaixin Chang <changhuaixin@linux.alibaba.com> wrote:
> 
> Move building of fast lookup table from boot to sorttable tool. This saves us
> 6380us boot time on Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz with cores. It
> adds a little more than 7ms to boot time when testing on the same CPU.
> 
> Changelog v2:
> 1. Write .orc_lookup section header via objtool
> 2. Move two ORC lookup table macro from orc_lookup.h into orc_types.h
> 3. Spell 'ORC' in capitalized fashion
> 
> Huaixin Chang (3):
>  objtool: Write .orc_lookup section header
>  scripts/sorttable: Build ORC fast lookup table via sorttable tool
>  x86/unwind/orc: Simplify unwind_init() for x86 boot
> 
> arch/x86/include/asm/orc_lookup.h      | 16 ------
> arch/x86/include/asm/orc_types.h       | 16 ++++++
> arch/x86/kernel/unwind_orc.c           | 41 +--------------
> arch/x86/kernel/vmlinux.lds.S          |  2 +-
> scripts/sorttable.h                    | 96 +++++++++++++++++++++++++++++++---
> tools/arch/x86/include/asm/orc_types.h | 16 ++++++
> tools/objtool/orc_gen.c                |  4 ++
> 7 files changed, 128 insertions(+), 63 deletions(-)
> 
> -- 
> 2.14.4.44.g2045bb6