diff options
author | Andi Kleen <andi@firstfloor.org> | 2009-09-16 05:50:10 -0400 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2009-09-16 05:50:10 -0400 |
commit | 14fa31b89c5ae79e4131da41761378a6df674352 (patch) | |
tree | c6c79e89e0aa0b2efeaf657d4715250a406ab699 /mm/vmscan.c | |
parent | a6e04aa92965565968573a220a35b4e907385697 (diff) |
HWPOISON: Use bitmask/action code for try_to_unmap behaviour
try_to_unmap currently has multiple modi (migration, munlock, normal unmap)
which are selected by magic flag variables. The logic is not very straight
forward, because each of these flag change multiple behaviours (e.g.
migration turns off aging, not only sets up migration ptes etc.)
Also the different flags interact in magic ways.
A later patch in this series adds another mode to try_to_unmap, so
this becomes quickly unmanageable.
Replace the different flags with a action code (migration, munlock, munmap)
and some additional flags as modifiers (ignore mlock, ignore aging).
This makes the logic more straight forward and allows easier extension
to new behaviours. Change all the caller to declare what they want to
do.
This patch is supposed to be a nop in behaviour. If anyone can prove
it is not that would be a bug.
Cc: Lee.Schermerhorn@hp.com
Cc: npiggin@suse.de
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index ba8228e0a806..ab3b0ad3ce52 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -659,7 +659,7 @@ static unsigned long shrink_page_list(struct list_head *page_list, | |||
659 | * processes. Try to unmap it here. | 659 | * processes. Try to unmap it here. |
660 | */ | 660 | */ |
661 | if (page_mapped(page) && mapping) { | 661 | if (page_mapped(page) && mapping) { |
662 | switch (try_to_unmap(page, 0)) { | 662 | switch (try_to_unmap(page, TTU_UNMAP)) { |
663 | case SWAP_FAIL: | 663 | case SWAP_FAIL: |
664 | goto activate_locked; | 664 | goto activate_locked; |
665 | case SWAP_AGAIN: | 665 | case SWAP_AGAIN: |