]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - mm/page_alloc.c
SLUB: ensure that the number of objects per slab stays low for high orders
[karo-tx-linux.git] / mm / page_alloc.c
index ac4f8c6b5c10771b71196c0af1238e894d225655..1a889c3fec59c0259496e4edb24ff929560c2b36 100644 (file)
@@ -1333,7 +1333,7 @@ nofail_alloc:
        reclaim_state.reclaimed_slab = 0;
        p->reclaim_state = &reclaim_state;
 
-       did_some_progress = try_to_free_pages(zonelist->zones, gfp_mask);
+       did_some_progress = try_to_free_pages(zonelist->zones, order, gfp_mask);
 
        p->reclaim_state = NULL;
        p->flags &= ~PF_MEMALLOC;
@@ -1370,7 +1370,8 @@ nofail_alloc:
         */
        do_retry = 0;
        if (!(gfp_mask & __GFP_NORETRY)) {
-               if ((order <= 3) || (gfp_mask & __GFP_REPEAT))
+               if ((order <= PAGE_ALLOC_COSTLY_ORDER) ||
+                                               (gfp_mask & __GFP_REPEAT))
                        do_retry = 1;
                if (gfp_mask & __GFP_NOFAIL)
                        do_retry = 1;