diff options
author | Ebru Akagunduz <[email protected]> | 2016-07-26 15:25:03 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2016-07-26 16:19:19 -0700 |
commit | 8a966ed746d63c8103d496da85973eeeec01d77f (patch) | |
tree | a96bcdb72409c34910440549c2e4fa248a468c4e /drivers/pwm/pwm-omap-dmtimer.c | |
parent | 70652f6ec0566ae6b4147d88c6d043c68484227f (diff) |
mm: make swapin readahead to improve thp collapse rate
This patch makes swapin readahead to improve thp collapse rate. When
khugepaged scanned pages, there can be a few of the pages in swap area.
With the patch THP can collapse 4kB pages into a THP when there are up
to max_ptes_swap swap ptes in a 2MB range.
The patch was tested with a test program that allocates 400B of memory,
writes to it, and then sleeps. I force the system to swap out all.
Afterwards, the test program touches the area by writing, it skips a
page in each 20 pages of the area.
Without the patch, system did not swap in readahead. THP rate was %65
of the program of the memory, it did not change over time.
With this patch, after 10 minutes of waiting khugepaged had collapsed
%99 of the program's memory.
[[email protected]: trivial cleanup of exit path of the function]
[[email protected]: __collapse_huge_page_swapin(): drop unused 'pte' parameter]
[[email protected]: do not hold anon_vma lock during swap in]
Signed-off-by: Ebru Akagunduz <[email protected]>
Acked-by: Rik van Riel <[email protected]>
Cc: Naoya Horiguchi <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: Xie XiuQi <[email protected]>
Cc: Cyrill Gorcunov <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Aneesh Kumar K.V <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Michal Hocko <[email protected]>
Signed-off-by: Kirill A. Shutemov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-omap-dmtimer.c')
0 files changed, 0 insertions, 0 deletions