[Top] [All Lists]

Re: [PATCH RFC 0/5] Speed booting by sorting exception tables at build t

To: David Daney <>
Subject: Re: [PATCH RFC 0/5] Speed booting by sorting exception tables at build time.
From: Mike Frysinger <>
Date: Sun, 20 Nov 2011 18:10:29 -0500
Cc:,,,,,, David Daney <>
In-reply-to: <>
References: <>
User-agent: KMail/1.13.7 (Linux/3.1.1; KDE/4.6.5; x86_64; ; )
On Friday 18 November 2011 14:37:43 David Daney wrote:
> I noticed when booting MIPS64 kernels that sorting of the main
> __ex_table was taking a long time (2,692,220 cycles or 3.3 mS at
> 800MHz to be exact).  That is not too bad for real silicon
> implementations, but when running on a slow simulator, it can be
> significant.

i've seen this perf hit in my simulation runs too

> Here is more or less what I did:
> o A flag word is added to the kernel to indicate that the __ex_table
>   is already sorted.  sort_main_extable() checks this and if it is
>   clear, returns without doing the sort.
> o I shamelessly stole code from recordmcount and created a new build
>   time helper program 'sortextable'.  This is run on the final vmlinux
>   image, it sorts the table, and then clears the flag word.
> Potential areas for improvement:
> o Sort module exception tables too.
> o Get rit of the flag word, and assume that if an architecture supports
>   build time sorting, that it must have been done.
> o Add support for architectures other than MIPS and x86

i don't see much here that is arch-specific.  why have a knob at all ?  let's 
just jump in with both feet and do this for everyone :).

Attachment: signature.asc
Description: This is a digitally signed message part.

<Prev in Thread] Current Thread [Next in Thread>