diff options
| author | Lee Schermerhorn <[email protected]> | 2005-10-30 01:15:51 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2005-10-30 04:40:36 +0000 |
| commit | c340010e4bf824d969a89fa192ecc7a526c0cd24 (patch) | |
| tree | a459fba71b05b3b14dc1e32739cc2520dd0e57be /fs/proc/array.c | |
| parent | [PATCH] mm/msync.c cleanup (diff) | |
| download | kernel-c340010e4bf824d969a89fa192ecc7a526c0cd24.tar.gz kernel-c340010e4bf824d969a89fa192ecc7a526c0cd24.zip | |
[PATCH] shrink_list(): skip anon pages if not may_swap
Martin Hicks' page cache reclaim patch added the 'may_swap' flag to the
scan_control struct; and modified shrink_list() not to add anon pages to
the swap cache if may_swap is not asserted.
Ref: http://marc.theaimsgroup.com/?l=linux-mm&m=111461480725322&w=4
However, further down, if the page is mapped, shrink_list() calls
try_to_unmap() which will call try_to_unmap_one() via try_to_unmap_anon ().
try_to_unmap_one() will BUG_ON() an anon page that is NOT in the swap
cache. Martin says he never encountered this path in his testing, but
agrees that it might happen.
This patch modifies shrink_list() to skip anon pages that are not already
in the swap cache when !may_swap, rather than just not adding them to the
cache.
Signed-off-by: Lee Schermerhorn <[email protected]>
Cc: Hugh Dickins <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/proc/array.c')
0 files changed, 0 insertions, 0 deletions
