aboutsummaryrefslogtreecommitdiff
path: root/lib/string_helpers.c
diff options
context:
space:
mode:
authorBo Liu <[email protected]>2009-11-02 16:50:33 +0000
committerLinus Torvalds <[email protected]>2009-11-02 09:44:41 -0800
commit32c5fc10e79a7053ac5728b01a0bff55cbcb9d49 (patch)
tree7a392ac3196770c49622d5d5cb41f77c46a35f83 /lib/string_helpers.c
parentc9354c85c1c7bac788ce57d3c17f2016c1c45b1d (diff)
mm: remove incorrect swap_count() from try_to_unuse()
In try_to_unuse(), swcount is a local copy of *swap_map, including the SWAP_HAS_CACHE bit; but a wrong comparison against swap_count(*swap_map), which masks off the SWAP_HAS_CACHE bit, succeeded where it should fail. That had the effect of resetting the mm from which to start searching for the next swap page, to an irrelevant mm instead of to an mm in which this swap page had been found: which may increase search time by ~20%. But we're used to swapoff being slow, so never noticed the slowdown. Remove that one spurious use of swap_count(): Bo Liu thought it merely redundant, Hugh rewrote the description since it was measurably wrong. Signed-off-by: Bo Liu <[email protected]> Signed-off-by: Hugh Dickins <[email protected]> Reviewed-by: KAMEZAWA Hiroyuki <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions