msm: bam_dmux: handle system wide low memory conditions
When A2 turns on, queue_rx() is first run from the SMSM thread, and
attempts to allocate 32 2kB-buffers with GFP_KERNEL for DMA transactions.
If the system is low on memory, the allocation could put the thread to
sleep while the memory allocator scavenges for enough memory to satisfy
the request. This is not desired as it stalls a critical system thread
that is communicating with a real-time system.
Instead, use GFP_NOWAIT which will return immediately if no memory is
available for the allocation request so that bam_dmux may handle the
situation gracefully and possibly reschedule the allocations for a later
time.
CRs-Fixed: 406946
Change-Id: I645acd29f7e0fa27883a27c043fc951cbdd91b84
Signed-off-by:
Jeffrey Hugo <jhugo@codeaurora.org>
Loading
Please register or sign in to comment