On 4/11/2024 11:06 PM, Baochen Qiang wrote: > Currently buf_len field of ath12k_mhi_config_wcn7850 is assigned > with 0, making MHI use a default size, 64KB, to allocate channel > buffers. This is likely to fail in some scenarios where system > memory is highly fragmented and memory compaction or reclaim is > not allowed. > > For now we haven't get any failure report on this in ath12k, but > there indeed is one such case in ath11k [1]. > > Actually those buffers are used only by QMI target -> host communication. > And for WCN7850, the largest packet size for that is less than 6KB. So > change buf_len field to 8KB, which results in order 1 allocation if page > size is 4KB. In this way, we can at least save some memory, and as well > as decrease the possibility of allocation failure in those scenarios. > > [1] https://lore.kernel.org/ath11k/96481a45-3547-4d23-ad34-3a8f1d90c1cd@xxxxxxx/ > > Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 > Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 > > Signed-off-by: Baochen Qiang <quic_bqiang@xxxxxxxxxxx> Acked-by: Jeff Johnson <quic_jjohnson@xxxxxxxxxxx>