Skip to contentSkip to conversation

honor __GFP_NOKILL

PATCH In review William Lee Irwin III 1 participant 1 message Sep 26, 2002

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/13 honor __GFP_NOKILL

In order to honor __GFP_NOKILL, the OOM killer should not be invoked when the __GFP_NOKILL flag is set. try_to_free_pages() is the sole caller of out_of_memory().

mm/vmscan.c +1 -1
diff -urN linux-2.5.33/mm/vmscan.c linux-2.5.33-mm5/mm/vmscan.c
@@ -688,7 +688,7 @@
 		blk_congestion_wait(WRITE, HZ/4);
 		shrink_slab(total_scanned, gfp_mask);
 	}
-	if (gfp_mask & __GFP_FS)
+	if ((gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NOKILL))
 		out_of_memory();
 	return 0;
 }

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/