Skip to content

Commit

Permalink
[PATCH] x86_64: Don't invoke OOM killer during dma_alloc_coherent()
Browse files Browse the repository at this point in the history
There is a fallback logic, so it's better to not use the OOM killer
in the allocations.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Mar 25, 2006
1 parent 554d284 commit 3056d6b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/x86_64/kernel/pci-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
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;
Expand Down

0 comments on commit 3056d6b

Please sign in to comment.