From: Paulo Marques <pmarques@grupopie.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>, Matt Mackall <mpm@selenic.com>
Subject: Re: [PATCH] kallsyms: speed up /proc/kallsyms
Date: Wed, 01 Sep 2004 12:17:18 +0100 [thread overview]
Message-ID: <4135AFBE.1000707@grupopie.com> (raw)
In-Reply-To: <1094016277.17828.53.camel@bach>
Rusty Russell wrote:
> On Wed, 2004-09-01 at 06:26, Paulo Marques wrote:
>
>>This patch implements the "is_exported" bit in the kallsyms_names
>>compressed stream, so that a "cat /proc/kallsyms" doesn't call
>>is_exported on every iteration.
>
>
> Prefer the patch split into "comments", "inconsistent kallsyms data fix"
> and "speedup". I also prefer using a whole letter over a single bit:
> this allows archs which have wierd nm letters to express them, and
> instead of case indicating what symbols are exported, we get the real
> correct results.
I'm still new to this :(
I'll send more fine-grained patches next time, grouped by issue addressed.
The single bit approach was meant to keep the current behavior, because
that is what I thought you wanted:
> The current code is simple. We could reserve the first letter in
> kallsyms_names for the type letter from System.map. The current upcase
> semantics are deliberately distorted to be more kernel-relevant (ie.
> exported are upper case) but simplistic.
>
> That's how I'd recommend "fixing" it.
I read this as: "we could have used the first letter in each symbol for
the type letter from System.map, but we deliberately distorted the
current semantics to be more kernel-relevant."
Since we are on different time zones, we only get to send an email a
day, so asking for confirmation and waiting for the reply would take a
long time... :(
Anyway, I'm assuming now that what we really want is the same type chars
that appear on the System.map file. If compiled with KALLSYMS_ALL, the
/proc/kallsyms file would be an almost exact copy of System.map.
So, moving forward...
A defconfig build produces 13743 symbols with a compressed name stream
of ~130kB. (it is 240kB uncompressed, for the curious)
Adding a letter to each symbol would increase this by about 10%.
We can try 2 different approaches to minimize the impact of this:
- have the letter inserted before the compression step. This way, the
table of the best tokens may have "tacpi_" instead of "acpi_" and
the compression would not suffer as much, except that the symbols
started with "Tacpi_" would suffer. Only real tests can show how
this would turn out.
- build a "sections" table that groups together symbols with the same
letter. The table would say symbols that have addresses between
X and Y would have letter Z. This can go horribly wrong if there
are situations where completely different type letters appear
intermixed.
I think I'll try the first approach first and see how it goes. I'll
post as soon as I got some numbers.
--
Paulo Marques - www.grupopie.com
To err is human, but to really foul things up requires a computer.
Farmers' Almanac, 1978
next prev parent reply other threads:[~2004-09-01 11:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-31 20:26 [PATCH] kallsyms: speed up /proc/kallsyms Paulo Marques
2004-09-01 5:24 ` Rusty Russell
2004-09-01 11:17 ` Paulo Marques [this message]
2004-09-01 19:27 ` Sam Ravnborg
2004-09-01 19:44 ` Paulo Marques
2004-09-01 19:51 ` Sam Ravnborg
2004-09-02 12:05 ` Paulo Marques
2004-09-02 22:17 ` Sam Ravnborg
2004-09-03 1:31 ` pmarques
2004-09-03 1:31 ` Andrew Morton
2004-09-03 2:59 ` [PATCH] kallsyms: correct type char in /proc/kallsyms Paulo Marques
2004-09-01 11:38 ` [PATCH] kallsyms: speed up /proc/kallsyms Paulo Marques
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=4135AFBE.1000707@grupopie.com \
--to=pmarques@grupopie.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=rusty@rustcorp.com.au \
/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