* [4/13] use __GFP_NOKILL in mempool_alloc()
@ 2002-09-26 5:42 William Lee Irwin III
0 siblings, 0 replies; only message in thread
From: William Lee Irwin III @ 2002-09-26 5:42 UTC (permalink / raw)
To: linux-mm
It is permissible to perform mempool allocations with __GFP_FS.
While no current caller does so, the following prevents pool->alloc()
from invoking the OOM killer when the request is serviceable by just
waiting on the mempool.
diff -urN linux-2.5.33/mm/mempool.c linux-2.5.33-mm5/mm/mempool.c
--- linux-2.5.33/mm/mempool.c 2002-09-04 04:02:00.000000000 -0700
+++ linux-2.5.33-mm5/mm/mempool.c 2002-09-08 19:52:51.000000000 -0700
@@ -186,8 +186,12 @@
void *element;
unsigned long flags;
DEFINE_WAIT(wait);
- int gfp_nowait = gfp_mask & ~(__GFP_WAIT | __GFP_IO);
+ int gfp_nowait;
int pf_flags = current->flags;
+
+ gfp_mask |= __GFP_NOKILL;
+
+ gfp_nowait = gfp_mask & ~(__GFP_WAIT | __GFP_IO | __GFP_NOKILL);
repeat_alloc:
current->flags |= PF_NOWARN;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-09-26 5:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-26 5:42 [4/13] use __GFP_NOKILL in mempool_alloc() William Lee Irwin III
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox