This is the first step towards representing THPs more efficiently in the page cache. The next step is to insert one head page instead of HPAGE_PMD_NR. This passes a Trinity run, but I'm sure there's a better test-case out there for THP. Matthew Wilcox (2): mm: Remove redundant test from find_get_pages_contig page cache: Store only head pages in i_pages include/linux/pagemap.h | 9 ++++ mm/filemap.c | 106 +++++++++++----------------------------- mm/khugepaged.c | 4 +- mm/shmem.c | 2 +- mm/swap_state.c | 2 +- 5 files changed, 42 insertions(+), 81 deletions(-) -- 2.19.1