thp: use compaction for all allocation orders
authorAndrea Arcangeli <[email protected]>
Thu, 13 Jan 2011 23:47:11 +0000 (15:47 -0800)
committerLinus Torvalds <[email protected]>
Fri, 14 Jan 2011 01:32:46 +0000 (17:32 -0800)
It makes no sense not to enable compaction for small order pages as we
don't want to end up with bad order 2 allocations and good and graceful
order 9 allocations.

Signed-off-by: Andrea Arcangeli <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/compaction.c

index 60d52a7298d535f3e8ff6ccec2369623e28425fd..6d592a021072a89048b6edd0ec79c8f965b83d49 100644 (file)
@@ -578,7 +578,7 @@ unsigned long try_to_compact_pages(struct zonelist *zonelist,
         * made because an assumption is made that the page allocator can satisfy
         * the "cheaper" orders without taking special steps
         */
-       if (order <= PAGE_ALLOC_COSTLY_ORDER || !may_enter_fs || !may_perform_io)
+       if (!order || !may_enter_fs || !may_perform_io)
                return rc;
 
        count_vm_event(COMPACTSTALL);