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 :).
-mike

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

Reply via email to