]> 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, 28 Sep 2011 00:49:39 +0000 (10:49 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 4 Oct 2011 07:38:17 +0000 (18:38 +1100)
commita41bc596f13913377df7299e0f7ed74d879a8c24
treead2ad424800e970ba1b20e0071ad62844eefd3bb
parent7a0e3706de7a54a0fd2354f74b359dd7580f897c
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 <>
arch/x86/kernel/e820.c