From: Shaohua Li Date: Mon, 29 Apr 2013 22:08:36 +0000 (-0700) Subject: mm: thp: add split tail pages to shrink page list in page reclaim X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~128^2~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bc7b8aca942d03bf2716ddcfcb4e0b57e43a1b8;p=pandora-kernel.git mm: thp: add split tail pages to shrink page list in page reclaim In page reclaim, huge page is split. split_huge_page() adds tail pages to LRU list. Since we are reclaiming a huge page, it's better we reclaim all subpages of the huge page instead of just the head page. This patch adds split tail pages to shrink page list so the tail pages can be reclaimed soon. Before this patch, run a swap workload: thp_fault_alloc 3492 thp_fault_fallback 608 thp_collapse_alloc 6 thp_collapse_alloc_failed 0 thp_split 916 With this patch: thp_fault_alloc 4085 thp_fault_fallback 16 thp_collapse_alloc 90 thp_collapse_alloc_failed 0 thp_split 1272 fallback allocation is reduced a lot. [akpm@linux-foundation.org: fix CONFIG_SWAP=n build] Signed-off-by: Shaohua Li Acked-by: Rik van Riel Acked-by: Minchan Kim Acked-by: Johannes Weiner Reviewed-by: Wanpeng Li Cc: Andrea Arcangeli Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed