msm: ipa: avoid OOM Killer for temp allocations

Make changes to use __GFP_RETRY_MAYFAIL to avoid triggering
OOM Killer when allocating pages for temp allocations.

Change-Id: I2f5843c9a1c0a9f41e215c8241713f4670e4b35c
Signed-off-by: Chaitanya Pratapa <quic_cpratapa@quicinc.com>
This commit is contained in:
Chaitanya Pratapa 2022-02-16 23:03:51 -08:00 • committed by Jagadeesh Ponduru
commit 8a2df63502

View file

@ -2189,6 +2189,9 @@ static struct ipa3_rx_pkt_wrapper *ipa3_alloc_rx_pkt_page(
return NULL;
rx_pkt->page_data.page_order = IPA_WAN_PAGE_ORDER;
/* For temporary allocations, avoid triggering OOM Killer. */
if (is_tmp_alloc)
flag |= __GFP_RETRY_MAYFAIL | __GFP_NOWARN;
/* Try a lower order page for order 3 pages in case allocation fails. */
rx_pkt->page_data.page = ipa3_alloc_page(flag,
&rx_pkt->page_data.page_order,