[PATCH] [37/66] x86_64: Don't invoke OOM killer during dma_alloc_coherent()
- Subject: [PATCH] [37/66] x86_64: Don't invoke OOM killer during dma_alloc_coherent()
- From: "Andi Kleen" <ak@xxxxxxx>
- Date: Thu, 23 Mar 2006 21:30:10 +0100
- Cc: linux-x86_64@xxxxxxxxxxxxxxx
- User-agent: nail 10.6 11/15/03
There is a fallback logic, so it's better to not use the OOM killer
in the allocations.
Signed-off-by: Andi Kleen <ak@xxxxxxx>
---
arch/x86_64/kernel/pci-dma.c | 3 +++
1 files changed, 3 insertions(+)
Index: linux/arch/x86_64/kernel/pci-dma.c
===================================================================
--- linux.orig/arch/x86_64/kernel/pci-dma.c
+++ linux/arch/x86_64/kernel/pci-dma.c
@@ -73,6 +73,9 @@ dma_alloc_coherent(struct device *dev, s
if (dma_mask == 0)
dma_mask = 0xffffffff;
+ /* Don't invoke OOM killer */
+ gfp |= __GFP_NORETRY;
+
/* Kludge to make it bug-to-bug compatible with i386. i386
uses the normal dma_mask for alloc_coherent. */
dma_mask &= *dev->dma_mask;
-
: send the line "unsubscribe linux-x86_64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux ia64]
[Linux MIPS Home]
[Linux Kernel]
[DCCP]
[Linux ARM]
[Linux]
[Photo]
[Yosemite News]
[Linux SCSI]
[Linux Hams]