qcacmn: Allocate IPA TX skb buffers with srng unlocked
On low memory system, skb allocation failures are observed in dp_tx_ipa_uc_attach during driver loading phase. Per kernel memory team analysis, failures are caused by large amount of atomic allocations. Currently when allocating IPA TX skbs, srng spinlock is first grabbed and then skb buffers are being requested, which makes skb allocation happen in atomic context. Fix is to make skb allocations with srng unlocked since it is safe for race conditions during driver loading time. This ensures skb allocations in process context. Change-Id: I1624276c087c8247d672fb7cea5daded07ab93a3 CRs-Fixed: 2426489
This commit is contained in:
@@ -234,7 +234,7 @@ static int dp_tx_ipa_uc_attach(struct dp_soc *soc, struct dp_pdev *pdev)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
hal_srng_access_start(soc->hal_soc, (void *)wbm_srng);
|
||||
hal_srng_access_start_unlocked(soc->hal_soc, (void *)wbm_srng);
|
||||
|
||||
/*
|
||||
* Allocate Tx buffers as many as possible
|
||||
@@ -276,7 +276,7 @@ static int dp_tx_ipa_uc_attach(struct dp_soc *soc, struct dp_pdev *pdev)
|
||||
__dp_ipa_handle_buf_smmu_mapping(soc, nbuf, true);
|
||||
}
|
||||
|
||||
hal_srng_access_end(soc->hal_soc, wbm_srng);
|
||||
hal_srng_access_end_unlocked(soc->hal_soc, wbm_srng);
|
||||
|
||||
soc->ipa_uc_tx_rsc.alloc_tx_buf_cnt = tx_buffer_count;
|
||||
|
||||
|
Reference in New Issue
Block a user