[RFC PATCH] mm: check global free_list if there is ongoing reclaiming when pcp fail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Zhaoyang Huang <zhaoyang.huang@xxxxxxxxxx>

Check the global free list again even if rmqueue_bulk failed for pcp pages when
there is ongoing reclaiming, which could eliminate potential direct reclaim by
chance.

Signed-off-by: Zhaoyang Huang <zhaoyang.huang@xxxxxxxxxx>
---
 mm/page_alloc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index e008a3d..7e99f7d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3729,7 +3729,8 @@ struct page *rmqueue(struct zone *preferred_zone,
 				migratetype != MIGRATE_MOVABLE) {
 			page = rmqueue_pcplist(preferred_zone, zone, order,
 					gfp_flags, migratetype, alloc_flags);
-			goto out;
+			if (page || !test_bit(ZONE_RECLAIM_ACTIVE, &zone->flags))
+				goto out;
 		}
 	}
 
-- 
1.9.1





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux