]> git.karo-electronics.de Git - karo-tx-linux.git/commit
arch/x86/kernel/e820.c: eliminate bubble sort from sanitize_e820_map
authorMike Ditto <mditto@google.com>
Fri, 2 Dec 2011 03:06:54 +0000 (14:06 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 2 Dec 2011 03:15:19 +0000 (14:15 +1100)
commit9a436bbcbcfb1b228da649c1b509e46a299b0d28
tree9e57754678ce9c30fc5d2f02d5bbb3eb97824532
parent15906798612f9625de9586e0396916fc8c77c337
arch/x86/kernel/e820.c: eliminate bubble sort from sanitize_e820_map

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