mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[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 <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
4cd3bb10ff
commit
11d31886db
2 changed files with 9 additions and 20 deletions
|
|
@ -116,8 +116,6 @@ enum {
|
|||
|
||||
/*
|
||||
* The in-memory structure used to track swap areas.
|
||||
* extent_list.prev points at the lowest-index extent. That list is
|
||||
* sorted.
|
||||
*/
|
||||
struct swap_info_struct {
|
||||
unsigned int flags;
|
||||
|
|
|
|||
Loading…
Reference in a new issue