mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: changhuaixin <changhuaixin@linux.alibaba.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: changhuaixin <changhuaixin@linux.alibaba.com>,
	jpoimboe@redhat.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 2/3] scripts/sorttable: Build orc fast lookup table via sorttable tool
Date: Mon, 27 Jul 2020 10:19:18 +0800	[thread overview]
Message-ID: <912EAD23-412F-482E-8CFF-D99FD01B1915@linux.alibaba.com> (raw)
In-Reply-To: <20200724135350.GA648324@gmail.com>



> On Jul 24, 2020, at 9:53 PM, Ingo Molnar <mingo@kernel.org> wrote:
> 
> 
> * Huaixin Chang <changhuaixin@linux.alibaba.com> wrote:
> 
>> Since orc tables are already sorted by sorttable tool, let us move
>> building of fast lookup table into sorttable tool too. This saves us
>> 6380us from boot time under Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz
>> with 64 cores.
> 
> Neat!
> 
>> +struct orc_sort_param {
>> +	size_t		lookup_table_size;
>> +	unsigned int	*orc_lookup_table;
>> +	unsigned long	start_ip;
>> +	size_t		text_size;
>> +	unsigned int	orc_num_entries;
>> +};
> 
>> 
>> +#define LOOKUP_BLOCK_ORDER	8
>> +#define LOOKUP_BLOCK_SIZE	(1 << LOOKUP_BLOCK_ORDER)
>> +
>> +	for (i = 0; i < lookup_num_blocks-1; i++) {
>> +		orc = __orc_find(g_orc_ip_table, g_orc_table,
>> +				 num_entries,
>> +				 lookup_start_ip + (LOOKUP_BLOCK_SIZE * i));
>> +		if (!orc) {
>> +			snprintf(g_err, ERRSTR_MAXSZ,
>> +					"Corrupt .orc_unwind table\n");
>> +			pthread_exit(g_err);
>> +		}
>> +
>> +		orc_lookup[i] = orc - g_orc_table;
>> +	}
>> +
>> +	/* Initialize the ending block: */
>> +	orc = __orc_find(g_orc_ip_table, g_orc_table, num_entries,
>> +			 lookup_stop_ip);
>> +	if (!orc) {
>> +		snprintf(g_err, ERRSTR_MAXSZ, "Corrupt .orc_unwind table\n");
>> +		pthread_exit(g_err);
>> +	}
>> +	orc_lookup[lookup_num_blocks-1] = orc - g_orc_table;
> 
> Yeah, so now this definition of LOOKUP_BLOCK_* basicaly duplicates the 
> arch/x86/include/asm/orc_lookup.h size, with no obvious link between 
> the two. This is asking for trouble.
> 
> <asm/orc_lookup.h> looks simple enough - can we include it in 
> scripts/sorttable.h?
> 
> Or better yet, please move these two defines into <asm/orc_types.h>, 
> which is already included in sorttable.h.
> 
Thanks!
Moving these two into <asm/orc_types.h> and capitalized spelling will be done in the following patches.

Huaixin

> BTW., please update your patches to spell 'ORC' in a capitalized 
> fashion, like most of the existing code does:
> 
>> 	/* create thread to sort ORC unwind tables concurrently */
> 
> Thanks,
> 
> 	Ingo


  reply	other threads:[~2020-07-27  2:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23  3:46 [PATCH RESEND 0/3] Build ORC fast lookup table in scripts/sorttable tool Huaixin Chang
2020-07-23  3:46 ` [PATCH 1/3] scripts/sorttable: Change section type of orc_lookup to SHT_PROGBITS Huaixin Chang
2020-07-24 13:55   ` Ingo Molnar
2020-08-04  1:40   ` changhuaixin
2020-08-06 15:08     ` Ingo Molnar
2020-08-07  4:22       ` changhuaixin
2020-07-23  3:46 ` [PATCH 2/3] scripts/sorttable: Build orc fast lookup table via sorttable tool Huaixin Chang
2020-07-24 13:53   ` Ingo Molnar
2020-07-27  2:19     ` changhuaixin [this message]
2020-07-23  3:46 ` [PATCH 3/3] x86/unwind/orc: Simplify unwind_init() for x86 boot Huaixin Chang
2020-08-07  4:17 ` [PATCH v2 0/3] Build ORC fast lookup table in scripts/sorttable tool Huaixin Chang
2020-08-07  4:18   ` [PATCH 1/3] objtool: Write .orc_lookup section header Huaixin Chang
2020-08-07  4:18   ` [PATCH 2/3] scripts/sorttable: Build ORC fast lookup table via sorttable tool Huaixin Chang
2020-08-07  4:18   ` [PATCH 3/3] x86/unwind/orc: Simplify unwind_init() for x86 boot Huaixin Chang
2020-08-19  3:03   ` [PATCH v2 0/3] Build ORC fast lookup table in scripts/sorttable tool changhuaixin
  -- strict thread matches above, loose matches on Subject: below --
2020-06-01 17:38 [PATCH 0/2] " Josh Poimboeuf
2020-06-03 14:31 ` [PATCH v2 0/3] " 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:39 ` [PATCH v3 0/3] Build ORC fast lookup table in scripts/sorttable tool Huaixin Chang
2020-06-03 14:39   ` [PATCH 2/3] scripts/sorttable: Build orc fast lookup table via sorttable tool Huaixin Chang

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=912EAD23-412F-482E-8CFF-D99FD01B1915@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@kernel.org \
    --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

all inboxes | Powered by JetHome®