* CMA allocation fails with default 128M on X1E80100 (Lenovo 21N1CT01WW) for ath12k @ 2026-02-28 9:29 René Mérou 2026-03-02 11:19 ` Konrad Dybcio 0 siblings, 1 reply; 5+ messages in thread From: René Mérou @ 2026-02-28 9:29 UTC (permalink / raw) To: linux-arm-msm@vger.kernel.org; +Cc: linux-wireless@vger.kernel.org Hi, I'm experiencing CMA allocation failures with the ath12k WiFi driver on my new Lenovo 21N1CT01WW (Snapdragon X1E80100). Error in dmesg cma: __cma_alloc: reserved: alloc failed, req-size: 257 pages, ret: -16 cma: => 1042 free of 32768 total pages System details Kernel: 6.17.0-8-qcom-x1e (Ubuntu) Default CMA size: 128M (set by the distribution for this hardware) WiFi chip: ath12k_pci (Qualcomm WCN685x) What I found With the default 128M CMA, the allocation of 257 pages (~1MB) fails After increasing CMA to 256M (by adding cma=256M to the kernel command line), the error disappears and WiFi works correctly My questions Is 128M expected to be sufficient for ath12k on this platform? Could the driver be optimized to need less contiguous memory? Should the default CMA size be increased to 256M for X1E80100 devices? Happy to provide more logs or test patches if needed. Thanks, Jean-René Mérou ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: CMA allocation fails with default 128M on X1E80100 (Lenovo 21N1CT01WW) for ath12k 2026-02-28 9:29 CMA allocation fails with default 128M on X1E80100 (Lenovo 21N1CT01WW) for ath12k René Mérou @ 2026-03-02 11:19 ` Konrad Dybcio 2026-03-02 11:20 ` Konrad Dybcio 0 siblings, 1 reply; 5+ messages in thread From: Konrad Dybcio @ 2026-03-02 11:19 UTC (permalink / raw) To: René Mérou, linux-arm-msm@vger.kernel.org Cc: linux-wireless@vger.kernel.org On 2/28/26 10:29 AM, René Mérou wrote: > Hi, > I'm experiencing CMA allocation failures with the ath12k WiFi driver on my new Lenovo 21N1CT01WW (Snapdragon X1E80100). > > Error in dmesg > cma: __cma_alloc: reserved: alloc failed, req-size: 257 pages, ret: -16 > cma: => 1042 free of 32768 total pages > > System details > Kernel: 6.17.0-8-qcom-x1e (Ubuntu) > Default CMA size: 128M (set by the distribution for this hardware) > WiFi chip: ath12k_pci (Qualcomm WCN685x) > > What I found > With the default 128M CMA, the allocation of 257 pages (~1MB) fails > After increasing CMA to 256M (by adding cma=256M to the kernel command line), the error disappears and WiFi works correctly > > My questions > Is 128M expected to be sufficient for ath12k on this platform? > Could the driver be optimized to need less contiguous memory? > Should the default CMA size be increased to 256M for X1E80100 devices? The default value in the arm64 defconfig is CONFIG_CMA_SIZE_MBYTES=32, although most laptop DTs individually add a 128M zone under /reserved-memory We should probably enlarge this value in either of those places, although I don't know whether changing the defconfig is going to be welcomed.. Konrad ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: CMA allocation fails with default 128M on X1E80100 (Lenovo 21N1CT01WW) for ath12k 2026-03-02 11:19 ` Konrad Dybcio @ 2026-03-02 11:20 ` Konrad Dybcio 2026-03-02 13:17 ` Dmitry Baryshkov 0 siblings, 1 reply; 5+ messages in thread From: Konrad Dybcio @ 2026-03-02 11:20 UTC (permalink / raw) To: René Mérou, linux-arm-msm@vger.kernel.org Cc: linux-wireless@vger.kernel.org, Krzysztof Kozlowski, Dmitry Baryshkov, Bjorn Andersson On 3/2/26 12:19 PM, Konrad Dybcio wrote: > On 2/28/26 10:29 AM, René Mérou wrote: >> Hi, >> I'm experiencing CMA allocation failures with the ath12k WiFi driver on my new Lenovo 21N1CT01WW (Snapdragon X1E80100). >> >> Error in dmesg >> cma: __cma_alloc: reserved: alloc failed, req-size: 257 pages, ret: -16 >> cma: => 1042 free of 32768 total pages >> >> System details >> Kernel: 6.17.0-8-qcom-x1e (Ubuntu) >> Default CMA size: 128M (set by the distribution for this hardware) >> WiFi chip: ath12k_pci (Qualcomm WCN685x) >> >> What I found >> With the default 128M CMA, the allocation of 257 pages (~1MB) fails >> After increasing CMA to 256M (by adding cma=256M to the kernel command line), the error disappears and WiFi works correctly >> >> My questions >> Is 128M expected to be sufficient for ath12k on this platform? >> Could the driver be optimized to need less contiguous memory? >> Should the default CMA size be increased to 256M for X1E80100 devices? > > The default value in the arm64 defconfig is CONFIG_CMA_SIZE_MBYTES=32, > although most laptop DTs individually add a 128M zone under /reserved-memory > > We should probably enlarge this value in either of those places, although I > don't know whether changing the defconfig is going to be welcomed.. +CC FYI Konrad ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: CMA allocation fails with default 128M on X1E80100 (Lenovo 21N1CT01WW) for ath12k 2026-03-02 11:20 ` Konrad Dybcio @ 2026-03-02 13:17 ` Dmitry Baryshkov 2026-03-02 16:14 ` Krzysztof Kozlowski 0 siblings, 1 reply; 5+ messages in thread From: Dmitry Baryshkov @ 2026-03-02 13:17 UTC (permalink / raw) To: Konrad Dybcio Cc: René Mérou, linux-arm-msm@vger.kernel.org, linux-wireless@vger.kernel.org, Krzysztof Kozlowski, Bjorn Andersson On Mon, Mar 02, 2026 at 12:20:17PM +0100, Konrad Dybcio wrote: > On 3/2/26 12:19 PM, Konrad Dybcio wrote: > > On 2/28/26 10:29 AM, René Mérou wrote: > >> Hi, > >> I'm experiencing CMA allocation failures with the ath12k WiFi driver on my new Lenovo 21N1CT01WW (Snapdragon X1E80100). > >> > >> Error in dmesg > >> cma: __cma_alloc: reserved: alloc failed, req-size: 257 pages, ret: -16 > >> cma: => 1042 free of 32768 total pages > >> > >> System details > >> Kernel: 6.17.0-8-qcom-x1e (Ubuntu) > >> Default CMA size: 128M (set by the distribution for this hardware) > >> WiFi chip: ath12k_pci (Qualcomm WCN685x) > >> > >> What I found > >> With the default 128M CMA, the allocation of 257 pages (~1MB) fails > >> After increasing CMA to 256M (by adding cma=256M to the kernel command line), the error disappears and WiFi works correctly > >> > >> My questions > >> Is 128M expected to be sufficient for ath12k on this platform? > >> Could the driver be optimized to need less contiguous memory? > >> Should the default CMA size be increased to 256M for X1E80100 devices? > > > > The default value in the arm64 defconfig is CONFIG_CMA_SIZE_MBYTES=32, > > although most laptop DTs individually add a 128M zone under /reserved-memory > > > > We should probably enlarge this value in either of those places, although I > > don't know whether changing the defconfig is going to be welcomed.. Can we change DT instead of changing defconfig? > > +CC FYI > > Konrad -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: CMA allocation fails with default 128M on X1E80100 (Lenovo 21N1CT01WW) for ath12k 2026-03-02 13:17 ` Dmitry Baryshkov @ 2026-03-02 16:14 ` Krzysztof Kozlowski 0 siblings, 0 replies; 5+ messages in thread From: Krzysztof Kozlowski @ 2026-03-02 16:14 UTC (permalink / raw) To: Dmitry Baryshkov, Konrad Dybcio Cc: René Mérou, linux-arm-msm@vger.kernel.org, linux-wireless@vger.kernel.org, Bjorn Andersson On 02/03/2026 14:17, Dmitry Baryshkov wrote: > On Mon, Mar 02, 2026 at 12:20:17PM +0100, Konrad Dybcio wrote: >> On 3/2/26 12:19 PM, Konrad Dybcio wrote: >>> On 2/28/26 10:29 AM, René Mérou wrote: >>>> Hi, >>>> I'm experiencing CMA allocation failures with the ath12k WiFi driver on my new Lenovo 21N1CT01WW (Snapdragon X1E80100). >>>> >>>> Error in dmesg >>>> cma: __cma_alloc: reserved: alloc failed, req-size: 257 pages, ret: -16 >>>> cma: => 1042 free of 32768 total pages >>>> >>>> System details >>>> Kernel: 6.17.0-8-qcom-x1e (Ubuntu) >>>> Default CMA size: 128M (set by the distribution for this hardware) >>>> WiFi chip: ath12k_pci (Qualcomm WCN685x) >>>> >>>> What I found >>>> With the default 128M CMA, the allocation of 257 pages (~1MB) fails >>>> After increasing CMA to 256M (by adding cma=256M to the kernel command line), the error disappears and WiFi works correctly >>>> >>>> My questions >>>> Is 128M expected to be sufficient for ath12k on this platform? >>>> Could the driver be optimized to need less contiguous memory? >>>> Should the default CMA size be increased to 256M for X1E80100 devices? >>> >>> The default value in the arm64 defconfig is CONFIG_CMA_SIZE_MBYTES=32, >>> although most laptop DTs individually add a 128M zone under /reserved-memory >>> >>> We should probably enlarge this value in either of those places, although I >>> don't know whether changing the defconfig is going to be welcomed.. > > Can we change DT instead of changing defconfig? > I don't think this is a DT property, because it depends how the driver behaves. If driver allocates smaller or bigger memory, then you keep changing the DT. And then if other OS does not use CMA, but "TrulyCMA", then we need to keep this growing, so just propose a change to defconfig. You can as well fix the drivers to use proper size, based on that DT, not cmdline argument. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-03-02 16:15 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-02-28 9:29 CMA allocation fails with default 128M on X1E80100 (Lenovo 21N1CT01WW) for ath12k René Mérou 2026-03-02 11:19 ` Konrad Dybcio 2026-03-02 11:20 ` Konrad Dybcio 2026-03-02 13:17 ` Dmitry Baryshkov 2026-03-02 16:14 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox