Skip to content
Commit b4c9bf17 authored by Feng Tang's avatar Feng Tang Committed by Joerg Roedel
Browse files

iommu/iova: change IOVA_MAG_SIZE to 127 to save memory



kmalloc will round up the request size to power of 2, and current
iova_magazine's size is 1032 (1024+8) bytes, so each instance
allocated will get 2048 bytes from kmalloc, causing around 1KB
waste.

Change IOVA_MAG_SIZE from 128 to 127 to make size of 'iova_magazine'
1024 bytes so that no memory will be wasted.

Signed-off-by: default avatarFeng Tang <feng.tang@intel.com>
Acked-by: default avatarRobin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20220703114450.15184-1-feng.tang@intel.com
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 4d26ba67
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment