public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: changhuaixin <changhuaixin@linux.alibaba.com>
To: jpoimboe@redhat.com
Cc: changhuaixin <changhuaixin@linux.alibaba.com>,
	bp@alien8.de, hpa@zytor.com, linux-kbuild@vger.kernel.org,
	linux-kernel@vger.kernel.org, luto@amacapital.net,
	michal.lkml@markovi.net, mingo@redhat.com,
	Peter Zijlstra <peterz@infradead.org>,
	tglx@linutronix.de, x86@kernel.org,
	yamada.masahiro@socionext.com
Subject: Re: [PATCH v3 0/3] Build ORC fast lookup table in scripts/sorttable tool
Date: Mon, 29 Jun 2020 10:14:01 +0800	[thread overview]
Message-ID: <217C22B3-D08F-4CB9-BC8D-3645C8389F5D@linux.alibaba.com> (raw)
In-Reply-To: <20200603143945.64248-1-changhuaixin@linux.alibaba.com>

Hi Josh, will you please have a look at this patchset?

There might be another way to set SHT_PROGBITS of section .orc_lookup by writing section headers when orc_unwind and orc_unwind_ip tables are writen. It might be as follows:

diff --git a/tools/objtool/orc_gen.c b/tools/objtool/orc_gen.c
index 3f98dcfbc177..860d4dcec8e6 100644
--- a/tools/objtool/orc_gen.c
+++ b/tools/objtool/orc_gen.c
@@ -183,6 +183,10 @@ int create_orc_sections(struct objtool_file *file)
        u_sec = elf_create_section(file->elf, ".orc_unwind",
                                   sizeof(struct orc_entry), idx);

+       /* make flags of section orc_lookup right */
+       if (!elf_create_section(file->elf, ".orc_lookup", sizeof(int), 0))
+               return -1;
+

What do you think about this way of setting SHT_PROGBITS?

> On Jun 3, 2020, at 10:39 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 v3:
> 1. Modify annotation of unwind_init().
> 
> Changelog v2:
> 1. Type of section orc_lookup needs to be SHT_PROGBITS.
> 2. unwind_init() cannot be removed totally as setting lookup_num_blocks is 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(-)
> 
> -- 
> 2.14.4.44.g2045bb6

      parent reply	other threads:[~2020-06-29  2:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29  6:46 [PATCH 0/2] Build ORC fast lookup table in scripts/sorttable tool Huaixin Chang
2020-04-29  6:46 ` [PATCH 1/2] scripts/sorttable: Build orc fast lookup table via sorttable tool Huaixin Chang
2020-04-29  6:46 ` [PATCH 2/2] x86/unwind/orc: Remove unwind_init() from x86 boot Huaixin Chang
2020-04-29  8:49 ` [PATCH 0/2] Build ORC fast lookup table in scripts/sorttable tool Peter Zijlstra
2020-04-30  2:32   ` changhuaixin
2020-04-30  4:06     ` Josh Poimboeuf
2020-04-30  4:10       ` Josh Poimboeuf
2020-05-22 18:28 ` Josh Poimboeuf
2020-05-25  3:33   ` changhuaixin
     [not found]   ` <482837A8-E9D9-4229-B7B1-8E14403FB2AC@linux.alibaba.com>
2020-06-01 17:38     ` Josh Poimboeuf
2020-06-03 13:47       ` changhuaixin
2020-06-03 14:31       ` [PATCH v2 0/3] " Huaixin Chang
2020-06-03 14:31         ` [PATCH 1/3] scripts/sorttable: Change section type of orc_lookup to SHT_PROGBITS Huaixin Chang
2020-06-03 14:31         ` [PATCH 2/3] scripts/sorttable: Build orc fast lookup table via sorttable tool Huaixin Chang
2020-06-03 14:31         ` [PATCH 3/3] x86/unwind/orc: Simplify unwind_init() for x86 boot Huaixin Chang
2020-06-03 14:39       ` [PATCH v3 0/3] Build ORC fast lookup table in scripts/sorttable tool Huaixin Chang
2020-06-03 14:39         ` [PATCH 1/3] scripts/sorttable: Change section type of orc_lookup to SHT_PROGBITS Huaixin Chang
2020-06-03 14:39         ` [PATCH 2/3] scripts/sorttable: Build orc fast lookup table via sorttable tool Huaixin Chang
2020-06-03 14:39         ` [PATCH 3/3] x86/unwind/orc: Simplify unwind_init() for x86 boot Huaixin Chang
2020-06-29  2:14         ` changhuaixin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=217C22B3-D08F-4CB9-BC8D-3645C8389F5D@linux.alibaba.com \
    --to=changhuaixin@linux.alibaba.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=michal.lkml@markovi.net \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox