Replace the bubble sort in sanitize_e820_map() with a call to the generic
commit8ba23a4aa99c85964519dc2baca434a021aee4f8
authorMike Ditto <mditto@google.com>
Wed, 24 Aug 2011 23:46:17 +0000 (25 09:46 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 25 Aug 2011 05:34:04 +0000 (25 15:34 +1000)
tree9ea3cfdfd2a8d13a892983219422fbf67be15615
parent541db9c90290ed6ccf104e456b8cc73139a148c9
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