From: Hugh Dickins Date: Sat, 3 Sep 2005 22:54:34 +0000 (-0700) Subject: [PATCH] swap: swap extent list is ordered X-Git-Tag: v2.6.14-rc1~986 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11d31886dbcb61039ed3789e583d21c6e70960fd;hp=11d31886dbcb61039ed3789e583d21c6e70960fd;p=linux-2.6 [PATCH] swap: swap extent list is ordered There are several comments that swap's extent_list.prev points to the lowest extent: that's not so, it's extent_list.next which points to it, as you'd expect. And a couple of loops in add_swap_extent which go all the way through the list, when they should just add to the other end. Fix those up, and let map_swap_page search the list forwards: profiles shows it to be twice as quick that way - because prefetch works better on how the structs are typically kmalloc'ed? or because usually more is written to than read from swap, and swap is allocated ascendingly? Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds ---