parisc: unwind - optimise linked-list searches for modules
authorPhil Carmody <ext-phil.2.carmody@nokia.com>
Fri, 10 Sep 2010 10:47:59 +0000 (13:47 +0300)
committerKyle McMartin <kyle@mcmartin.ca>
Fri, 22 Oct 2010 01:12:19 +0000 (21:12 -0400)
commitb1b1d4a6f244eb9513f006a188f7ed30d5014de5
tree7fbdf118088f9d3746f384ea26312548ba5719dd
parentf720817700de48a57f54535a5dd9783cca2d2d6b
parisc: unwind - optimise linked-list searches for modules

Having many dozens of modules, the searches down the linked
list of sections would dominate the lookup time, dwarfing
any savings from the binary search within the section.

A simple move-to-front optimisation exploits the commonality
of the code paths taken, and in simple real-world tests
on other architectures reduced the number of steps in the
search to barely more than 1.

Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Kyle McMartin <kyle@redhat.com>
arch/parisc/kernel/unwind.c