aboutsummaryrefslogtreecommitdiffstats
path: root/lib/genalloc.c
diff options
context:
space:
mode:
authorNicolin Chen <[email protected]>2019-05-24 04:06:33 +0000
committerChristoph Hellwig <[email protected]>2019-06-03 14:00:07 +0000
commitbd2e75633c8012fc8a7431c82fda66237133bf7e (patch)
tree7f7b8c21585a18f68acff279c6aa4ca8f582e6eb /lib/genalloc.c
parentdma-contiguous: add dma_{alloc,free}_contiguous() helpers (diff)
downloadkernel-bd2e75633c8012fc8a7431c82fda66237133bf7e.tar.gz
kernel-bd2e75633c8012fc8a7431c82fda66237133bf7e.zip
dma-contiguous: use fallback alloc_pages for single pages
The addresses within a single page are always contiguous, so it's not so necessary to always allocate one single page from CMA area. Since the CMA area has a limited predefined size of space, it may run out of space in heavy use cases, where there might be quite a lot CMA pages being allocated for single pages. However, there is also a concern that a device might care where a page comes from -- it might expect the page from CMA area and act differently if the page doesn't. This patch tries to use the fallback alloc_pages path, instead of one-page size allocations from the global CMA area in case that a device does not have its own CMA area. This'd save resources from the CMA global area for more CMA allocations, and also reduce CMA fragmentations resulted from trivial allocations. Signed-off-by: Nicolin Chen <[email protected]> Tested-by: dann frazier <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'lib/genalloc.c')
0 files changed, 0 insertions, 0 deletions