linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [3/13] add __GFP_NOKILL to SLAB_KERNEL
@ 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

Slab allocations are failable, hence any SLAB_KERNEL allocation should
be failed when not serviceable instead of killing innocent tasks. In
particular, vm_area_structs, temporary filename buffers (getname),
dentries, inodes, filp's, task_structs, and some others were all seen to
trigger the OOM killer. It seemed best to consolidate it in SLAB_KERNEL.


diff -urN linux-2.5.33/include/linux/slab.h linux-2.5.33-mm5/include/linux/slab.h
--- linux-2.5.33/include/linux/slab.h	2002-09-04 04:02:00.000000000 -0700
+++ linux-2.5.33-mm5/include/linux/slab.h	2002-09-08 20:55:27.000000000 -0700
@@ -20,10 +20,10 @@
 #define SLAB_NOHIGHIO		GFP_NOHIGHIO
 #define	SLAB_ATOMIC		GFP_ATOMIC
 #define	SLAB_USER		GFP_USER
-#define	SLAB_KERNEL		GFP_KERNEL
+#define	SLAB_KERNEL		(GFP_KERNEL | __GFP_NOKILL)
 #define	SLAB_DMA		GFP_DMA
 
-#define SLAB_LEVEL_MASK		(__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_HIGHIO|__GFP_FS)
+#define SLAB_LEVEL_MASK		(__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_HIGHIO|__GFP_FS|__GFP_NOKILL)
 #define	SLAB_NO_GROW		0x00001000UL	/* don't grow a cache */
 
 /* flags to pass to kmem_cache_create().
--
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 [3/13] add __GFP_NOKILL to SLAB_KERNEL 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