diff options
author | Hugh Dickins <hugh@veritas.com> | 2008-02-05 07:28:45 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 18:44:15 +0100 |
commit | 8952898b0d25223f38daf46b86156fd1c4d17ad0 (patch) | |
tree | 10912460cd9d42195d4aba8250ed1c3bd3577bb4 /usr | |
parent | shmem_file_write is redundant (diff) | |
download | linux-8952898b0d25223f38daf46b86156fd1c4d17ad0.tar.xz linux-8952898b0d25223f38daf46b86156fd1c4d17ad0.zip |
swapin: fix valid_swaphandles defect
valid_swaphandles is supposed to do a quick pass over the swap map entries
neigbouring the entry which swapin_readahead is targetting, to determine for
it a range worth reading all together. But since it always starts its search
from the beginning of the swap "cluster", a reject (free entry) there
immediately curtails the readaround, and every swapin_readahead from that
cluster is for just a single page. Instead scan forwards and backwards around
the target entry.
Use better names for some variables: a swap_info pointer is usually called
"si" not "swapdev". And at the end, if only the target page should be read,
return count of 0 to disable readaround, to avoid the unnecessarily repeated
call to read_swap_cache_async.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: Rik van Riel <riel@surriel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions