aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorHugh Dickins <[email protected]>2009-12-14 17:58:58 -0800
committerLinus Torvalds <[email protected]>2009-12-15 08:53:17 -0800
commit53f79acb6ecb648afd63e0f13deba167f1a934df (patch)
tree48d9b998fa45c4fe510447d17cdc050f31be5e23 /tools/perf/scripts/python
parent3ca7b3c5b64d35fe02c35b5d44c2c58b49499fee (diff)
mm: mlocking in try_to_unmap_one
There's contorted mlock/munlock handling in try_to_unmap_anon() and try_to_unmap_file(), which we'd prefer not to repeat for KSM swapping. Simplify it by moving it all down into try_to_unmap_one(). One thing is then lost, try_to_munlock()'s distinction between when no vma holds the page mlocked, and when a vma does mlock it, but we could not get mmap_sem to set the page flag. But its only caller takes no interest in that distinction (and is better testing SWAP_MLOCK anyway), so let's keep the code simple and return SWAP_AGAIN for both cases. try_to_unmap_file()'s TTU_MUNLOCK nonlinear handling was particularly amusing: once unravelled, it turns out to have been choosing between two different ways of doing the same nothing. Ah, no, one way was actually returning SWAP_FAIL when it meant to return SWAP_SUCCESS. [[email protected]: comment adding to mlocking in try_to_unmap_one] [[email protected]: remove test of MLOCK_PAGES] Signed-off-by: Hugh Dickins <[email protected]> Cc: Izik Eidus <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Nick Piggin <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Lee Schermerhorn <[email protected]> Cc: Andi Kleen <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Wu Fengguang <[email protected]> Cc: Minchan Kim <[email protected]> Signed-off-by: KOSAKI Motohiro <[email protected]> Cc: Andi Kleen <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions