vmalloc_32 should use GFP_KERNEL
Subsystems (2)
PATCH 1/1 vmalloc_32 should use GFP_KERNEL
I've noticed lots of failures of vmalloc_32 on machines where it shouldn't have failed unless it was doing an atomic operation.
Looking closely, I noticed that:
#if defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA32) #define GFP_VMALLOC32 GFP_DMA32
#elif defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA) #define GFP_VMALLOC32 GFP_DMA
#else
#define GFP_VMALLOC32 GFP_KERNEL
#endif
Which seems to be incorrect, it should always -or- in the DMA flags on top of GFP_KERNEL, thus this patch.
---
This fixes frequent errors launchin X with the nouveau DRM for example.
mm/vmalloc.c +2 -2
@@ -578,9 +578,9 @@ void *vmalloc_exec(unsigned long size) }#if defined(CONFIG_64BIT ) && defined(CONFIG_ZONE_DMA32 ) -#define GFP_VMALLOC32 GFP_DMA32 +#define GFP_VMALLOC32 GFP_DMA32 | GFP_KERNEL#elif defined(CONFIG_64BIT ) && defined(CONFIG_ZONE_DMA ) -#define GFP_VMALLOC32 GFP_DMA +#define GFP_VMALLOC32 GFP_DMA | GFP_KERNEL#else #define GFP_VMALLOC32 GFP_KERNEL#endif
--
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/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Andrew Morton
maintainerQuoted 28 lines · On Wed, 18 Jul 2007 16:25:34 +1000 Benjamin Herrenschmidt…
I've noticed lots of failures of
vmalloc_32on machines where it shouldn't have failed unless it was doing an atomic operation.Looking closely, I noticed that:
#if
defined(CONFIG_64BIT)&&defined(CONFIG_ZONE_DMA32)#defineGFP_VMALLOC32GFP_DMA32
#elifdefined(CONFIG_64BIT)&&defined(CONFIG_ZONE_DMA)#defineGFP_VMALLOC32GFP_DMA
#else
#defineGFP_VMALLOC32GFP_KERNEL
#endifWhich seems to be incorrect, it should always -or- in the DMA flags on top of
GFP_KERNEL, thus this patch.Signed-off-by Benjamin Herrenschmidt <[email protected]>---
This fixes frequent errors launchin X with the nouveau DRM for example.
Index:
linux-work/mm/vmalloc.c
===================================================================mm/vmalloc.c +0
-0@@ -578,9 +578,9 @@ void *vmalloc_exec(unsigned long size) }
mm/vmalloc.c void *vmalloc_exec(unsigned long size) · line 586
Quoted 10 lines
mm/vmalloc.c +2
-2#if defined(CONFIG_64BIT ) && defined(CONFIG_ZONE_DMA32 ) -#define GFP_VMALLOC32 GFP_DMA32 +#define GFP_VMALLOC32 GFP_DMA32 | GFP_KERNEL#elif defined(CONFIG_64BIT ) && defined(CONFIG_ZONE_DMA ) -#define GFP_VMALLOC32 GFP_DMA +#define GFP_VMALLOC32 GFP_DMA | GFP_KERNEL#else #define GFP_VMALLOC32 GFP_KERNEL#endif
whoops, yes.
Are those errors serious and common enough for 2.6.22.x?
--
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/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 3 lines · Andrew Morton
whoops, yes.
Are those errors serious and common enough for 2.6.22.x?
No idea, so far, the nouveau DRM isn't something I would recommend to people to use in stable environments but heh... I don't know who else uses vmalloc_32.
Cheers,
Ben.
--
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/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 8 lines · On Wed, 18 Jul 2007 16:49:14 +1000 Benjamin Herrenschmidt…
Quoted 3 lines · Andrew Morton
whoops, yes.
Are those errors serious and common enough for 2.6.22.x?
No idea, so far, the nouveau DRM isn't something I would recommend to people to use in stable environments but heh... I don't know who else uses
vmalloc_32.
Mostly older video capture.
Alan