]> 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>
Thu, 29 Sep 2011 06:07:50 +0000 (16:07 +1000)
commitf757969e695f574d5e2c89afc7e1490cd8305965
treef5300d288622bccae45d05d5b5f4d07b75535dc8
parent92d98ad6792ae525ff79aef7bc999693a7b2f092
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