Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ALSA: memalloc: use __GFP_RETRY_MAYFAIL in snd_malloc_dev_pages()
Use __GFP_RETRY_MAYFAIL instead of __GFP__NORETRY in snd_malloc_dev_pages() to allocate pages for device memory. The MAYFAIL flag retains the semantics of not triggering the OOM killer, but lowers the risk of alloc failure. This change addresses recurring failures with SOF audio driver in test cases where a system suspend stress test is run combined with a high memory-load use-case. The failure typically shows up as: [ 379.480229] sof-audio-pci-intel-tgl 0000:00:1f.3: booting DSP firmware [ 379.484803] sof-audio-pci-intel-tgl 0000:00:1f.3: error: memory alloc failed: -12 [ 379.484810] sof-audio-pci-intel-tgl 0000:00:1f.3: error: dma prepare for ICCMAX stream failed Debug on these systems has shown that even a single page alloc fails with __GFP_NORETRY in this case. However, while under significant load on physical memory, the system does have lots of reclaimable pages available, so with __GFP_RETRY_MAYFAIL, the issue is not hit. The error is fairly severe as audio capability is completely lost at system resume, so seems that RETRY_MAYFAIL is a better default approach to use here. BugLink: thesofproject#3844 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
- Loading branch information