From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linux Kernel list <linux-kernel@vger.kernel.org>
Cc: linux-mm@kvack.org, Dave Airlie <airlied@gmail.com>,
Andrew Morton <akpm@osdl.org>
Subject: [PATCH] vmalloc_32 should use GFP_KERNEL
Date: Wed, 18 Jul 2007 16:25:34 +1000 [thread overview]
Message-ID: <1184739934.25235.220.camel@localhost.localdomain> (raw)
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.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
This fixes frequent errors launchin X with the nouveau DRM for example.
Index: linux-work/mm/vmalloc.c
===================================================================
--- linux-work.orig/mm/vmalloc.c 2007-07-18 16:22:00.000000000 +1000
+++ linux-work/mm/vmalloc.c 2007-07-18 16:22:11.000000000 +1000
@@ -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
WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linux Kernel list <linux-kernel@vger.kernel.org>
Cc: linux-mm@kvack.org, Dave Airlie <airlied@gmail.com>,
Andrew Morton <akpm@osdl.org>
Subject: [PATCH] vmalloc_32 should use GFP_KERNEL
Date: Wed, 18 Jul 2007 16:25:34 +1000 [thread overview]
Message-ID: <1184739934.25235.220.camel@localhost.localdomain> (raw)
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.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
This fixes frequent errors launchin X with the nouveau DRM for example.
Index: linux-work/mm/vmalloc.c
===================================================================
--- linux-work.orig/mm/vmalloc.c 2007-07-18 16:22:00.000000000 +1000
+++ linux-work/mm/vmalloc.c 2007-07-18 16:22:11.000000000 +1000
@@ -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 majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2007-07-18 6:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-18 6:25 Benjamin Herrenschmidt [this message]
2007-07-18 6:25 ` [PATCH] vmalloc_32 should use GFP_KERNEL Benjamin Herrenschmidt
2007-07-18 6:33 ` Andrew Morton
2007-07-18 6:33 ` Andrew Morton
2007-07-18 6:49 ` Benjamin Herrenschmidt
2007-07-18 6:49 ` Benjamin Herrenschmidt
2007-07-18 10:54 ` Alan Cox
2007-07-18 10:54 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1184739934.25235.220.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=airlied@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.