Skip to content

Commit

Permalink
ALSA: emu10k1 - Fix page allocation with GFP_DMA
Browse files Browse the repository at this point in the history
Added the missing GFP_ATOMIC to page_alloc when called with GFP_DMA.
GFP_KERNEL often results in stalls for ZONE_DMA, so GFP_ATOMIC is more
prgmatic.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Jun 13, 2008
1 parent 36ca6e1 commit 781711a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/emu10k1/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ static int synth_alloc_pages(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk
__GFP_NOWARN);
if (!p || (page_to_pfn(p) & ~(emu->dma_mask >> PAGE_SHIFT)))
/* try to allocate from <16MB zone */
p = alloc_page(GFP_DMA |
p = alloc_page(GFP_ATOMIC | GFP_DMA |
__GFP_NORETRY | /* no OOM-killer */
__GFP_NOWARN);
if (!p) {
Expand Down

0 comments on commit 781711a

Please sign in to comment.