Files
kernel_xiaomi_cepheus/include/linux/dma-buf.h
Park Ju Hyung 92af2b142c dma_buf: try to use kmem_cache pool for dmabuf allocations
These get allocated and freed millions of times on this kernel tree.
Use a dedicated kmem_cache pool and avoid costly dynamic memory allocations.

Most allocations' size is:
(sizeof(struct dma_buf) + sizeof(struct reservation_object)).

Put those under kmem_cache pool and distinguish them with dmabuf->from_kmem
flag.

Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
[@0ctobot: Adapted for 4.19]
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
2021-10-20 22:09:20 +00:00

20 KiB