Replace the bubble sort in sanitize_e820_map() with a call to the generic
commit7933daf5f44f9b4891768dc0d15ad28420c5b313
authorMike Ditto <mditto@google.com>
Wed, 24 Aug 2011 23:46:17 +0000 (25 09:46 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 31 Aug 2011 04:27:19 +0000 (31 14:27 +1000)
tree783ab0e9b2b4aab4fe5fe526274e2814ca796ae9
parent692e44de256fa5c149d755d94123c7efa9dfddc8
Replace the bubble sort in sanitize_e820_map() with a call to the generic
kernel sort function to avoid pathological performance with large maps.

On large (thousands of entries) E820 maps, the previous code took minutes
to run; with this change it's now milliseconds.

Signed-off-by: Mike Ditto <mditto@google.com>
Cc: Stefan Assmann <sassmann@kpanic.de>
Cc: Nancy Yuen <yuenn@google.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/kernel/e820.c