]> 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>
Tue, 15 Nov 2011 22:46:50 +0000 (14:46 -0800)
committerIngo Molnar <mingo@elte.hu>
Mon, 5 Dec 2011 16:08:14 +0000 (17:08 +0100)
commitd1bbdd669298b7ca08284ddb29153dfc039dd89d
treea7c0a527b509d338cf2cfeb63a40f323d864da08
parent9af0c7a6fa860698d080481f24a342ba74b68982
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: sassmann@kpanic.de
Cc: yuenn@google.com
Cc: Stefan Assmann <sassmann@kpanic.de>
Cc: Nancy Yuen <yuenn@google.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/e820.c