]> 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>
Wed, 5 Oct 2011 00:42:24 +0000 (11:42 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 12 Oct 2011 06:31:49 +0000 (17:31 +1100)
commitefbe7bb3d65da9f9d956e8e245837f3cf3850a16
tree1e3f224a0c9bd94da2e77bde3bd636cf64ee66e2
parent724068358bf78c1cd7aa167d33c2a898c2bbd90d
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