8/13/2023 0 Comments Intel power gadget core reqIntel Power Gadget is a software-based power usage monitoring tool enabled for Intel Core processors (from 2nd Generation up to 7th Generation Intel Core processors). With this release, we are providing functionality to evaluate power information on various platforms including notebooks, desktops. Throw in a bunch of mlx5 cards, and I suspect we'll still see cma_alloc log spew on this platform.It is supported on Windows and OS X, and includes an application, driver, and libraries to monitor and estimate real-time processor package power information in watts using the energy counters in the processor. Keeping in mind that this is just tuning for a specific system/config. So there maybe other reasons we want to bump to at least 32M - I'm not sure that we'd want to go all the way to 64M for general purpose kernel though. Which is apparently required for the RPi VC4: Note that upstream's defconfig allocates 32M of CMA, However, Ubuntu ships with only 16M of CMA. This avoids the impact of the CMA memory usage increase in the RDMA/hns driver (see comment #11) and - with the aforementioned hisi_sas patch - those allocations as well.Īfter those optimizations, I am able to fulfill all cma allocation requests from our D06 CS board with cma=64M. In addition, there is DMA/CMA optimization making its way upstream, that uses non-CMA memory for single page requests: If there is no significant performance impact, that could be a way forward to deal with the fragmentation issue costing us up to 31M of CMA. The hisi_sas maintainer is experimenting with a patch that will change the driver's 33 page allocations to single page allocations. I wonder if it'd be possible to adjust this allocation somehow. The culprit for the 256 33 page allocations (that causes the fragmentation mentioned in comment #8) is the hisi_sas_v3_hw driver: 256 * 31 * 4K = 31M of potentially wasted space. They are getting allocated on 64M boundaries, which ends up leaving 31 free pages per allocation. What is concerning is the 252 33 page allocations (a subset of the 256 in the histogram). I don't see any signs of fragmentation w/ the single page allocations. To understand the fragmentation impact, I looked at the debugfs cma bitmap. But we know that total allocation size isn't the only problem - fragmentation must be playing a role, as we're using ~61M, but still seeing errors w/ cma=64M. While that's the largest # of allocations by page size, that's only really 13% of the allocated pages, just over 8M. $ dmesg | grep "cma: cma_alloc(cma" | sed -r 's/.*count In the upstream thread, Robin asked if this was potentially an issue with lots of 1 page allocations - something for which patches have been proposed. To try to understand how the CMA is allocated - and what the problem might be - I booted a HiSilicon D06 w/ plenty of cma cushion (cma=128M), and looked at cma debugfs. Tested on a HiSilicon D06 and HP m400 (Hi1620 & X-Gene arm64). Per-driver optimizations can be used to make further improvements, but we should track those in other bugs. Some system configs will still have some of these errors even after this fix - but this should reduce them significantly. These are "err" priority messages though, so even a lower number of them is still disconcerting.ġ) Bump up the amount of available CMA on arm64 to 32M (same as upstream defconfig)Ģ) A patch-set from linux-next that redirects dma-direct contiguous allocations to alloc_pages() for single page allocations (single pages are by definition contiguous), avoiding CMA usage/fragmenta tion. In a previous SRU ( bug 1828092), we worked around this by just rate-limiting these messages. cma: cma_alloc: alloc failed, req-size: 16 pages, ret: -12 cma: cma_alloc: alloc failed, req-size: 64 pages, ret: -12 On other arm64 systems that began spewing these messages on boot - sometimes > 10K of them: We enabled CONFIG_DMA_CMA to fix bug 1803206, but that led to a regression
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |