From: Christoph Lameter Date: Fri, 10 Mar 2006 01:33:47 +0000 (-0800) Subject: [PATCH] vmscan: no zone_reclaim if PF_MALLOC is set X-Git-Tag: v2.6.16-rc6~37 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a6bf527091b1dd40f1b6a496812ce7520621c282;p=linux-2.6-omap-h63xx.git [PATCH] vmscan: no zone_reclaim if PF_MALLOC is set If the process has already set PF_MALLOC and is already using current->reclaim_state then do not try to reclaim memory from the zone. This is set by kswapd and/or synchrononous global reclaim which will not take it lightly if we zap the reclaim_state. Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/vmscan.c b/mm/vmscan.c index b0af7593d01..7ccf763bb30 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1883,7 +1883,8 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order) if (!(gfp_mask & __GFP_WAIT) || zone->all_unreclaimable || - atomic_read(&zone->reclaim_in_progress) > 0) + atomic_read(&zone->reclaim_in_progress) > 0 || + (p->flags & PF_MEMALLOC)) return 0; node_id = zone->zone_pgdat->node_id;