diff options
| author | Huang Ying <[email protected]> | 2018-08-21 21:52:09 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2018-08-22 10:52:43 -0700 |
| commit | afa4711ef1399beb60964dcb2cd0369dfb0ac20a (patch) | |
| tree | 437ec2013e08f5be2e15fa4ac61a61896b7739d0 /tools/perf/scripts | |
| parent | fe5266d5d5948abc6e71cdabb98e3f5cba811205 (diff) | |
mm/swapfile.c: use swap_count() in swap_page_trans_huge_swapped()
In swap_page_trans_huge_swapped(), to identify whether there's any page
table mapping for a 4k sized swap entry, "si->swap_map[i] !=
SWAP_HAS_CACHE" is used. This works correctly now, because all users of
the function will only call it after checking SWAP_HAS_CACHE. But as
pointed out by Daniel, it is better to use "swap_count(map[i])" here,
because it works for "map[i] == 0" case too.
And this makes the implementation more consistent between normal and
huge swap entry.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: "Huang, Ying" <[email protected]>
Suggested-and-reviewed-by: Daniel Jordan <[email protected]>
Acked-by: Dave Hansen <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Shaohua Li <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts')
0 files changed, 0 insertions, 0 deletions