No zone_reclaim if PF_MALLOC is set.

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

 



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 <[email protected]>

Index: linux-2.6.16-rc5/mm/vmscan.c
===================================================================
--- linux-2.6.16-rc5.orig/mm/vmscan.c	2006-02-26 21:09:35.000000000 -0800
+++ linux-2.6.16-rc5/mm/vmscan.c	2006-03-08 20:35:47.000000000 -0800
@@ -1883,7 +1883,8 @@ int zone_reclaim(struct zone *zone, gfp_
 
 	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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux