diff options
| author | Ebru Akagunduz <[email protected]> | 2015-04-14 15:45:24 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2015-04-14 16:49:01 -0700 |
| commit | ca0984caa8235762dc4e22c1c47ae6719dcc4064 (patch) | |
| tree | 6c59dae501f781e970d81d60580cf52542356a09 /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | 2149cdaef6c0eb59a9edf3b152027392cd66b41f (diff) | |
mm: incorporate zero pages into transparent huge pages
This patch improves THP collapse rates, by allowing zero pages.
Currently THP can collapse 4kB pages into a THP when there are up to
khugepaged_max_ptes_none pte_none ptes in a 2MB range. This patch counts
pte none and mapped zero pages with the same variable.
The patch was tested with a program that allocates 800MB of
memory, and performs interleaved reads and writes, in a pattern
that causes some 2MB areas to first see read accesses, resulting
in the zero pfn being mapped there.
To simulate memory fragmentation at allocation time, I modified
do_huge_pmd_anonymous_page to return VM_FAULT_FALLBACK for read faults.
Without the patch, only %50 of the program was collapsed into THP and the
percentage did not increase over time.
With this patch after 10 minutes of waiting khugepaged had collapsed %99
of the program's memory.
[[email protected]: fix bogus BUG()]
Signed-off-by: Ebru Akagunduz <[email protected]>
Reviewed-by: Rik van Riel <[email protected]>
Reviewed-by: Andrea Arcangeli <[email protected]>
Acked-by: Kirill A. Shutemov <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Sasha Levin <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Mel Gorman <[email protected]>
Signed-off-by: Andrea Arcangeli <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions