]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm, compaction: skip compound pages by order in free scanner
authorVlastimil Babka <vbabka@suse.cz>
Tue, 8 Sep 2015 22:02:49 +0000 (15:02 -0700)
committerDhaval Giani <dhaval.giani@oracle.com>
Fri, 20 Jan 2017 22:21:57 +0000 (17:21 -0500)
commit94e51d62e2df39e9c2c6c73949d03bddac0b3756
treeadf00229fe33f6a03cd266009721d1d7b26698f2
parent2d459931f882788b8f19b3e790d8527e89ee92ea
mm, compaction: skip compound pages by order in free scanner

Orabug: 25308030

[ Upstream commit 9fcd6d2e052eef525e94a9ae58dbe7ed4df4f5a7 ]

The compaction free scanner is looking for PageBuddy() pages and
skipping all others.  For large compound pages such as THP or hugetlbfs,
we can save a lot of iterations if we skip them at once using their
compound_order().  This is generally unsafe and we can read a bogus
value of order due to a race, but if we are careful, the only danger is
skipping too much.

When tested with stress-highalloc from mmtests on 4GB system with 1GB
hugetlbfs pages, the vmstat compact_free_scanned count decreased by at
least 15%.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Mel Gorman <mgorman@suse.de>
Acked-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 683854270f84daa09baffe2b21d64ec88c614fa9)
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
mm/compaction.c