未验证 提交 77a2f577 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!1244 set the iova rcache global

Merge Pull Request from: @ci-robot 
 
PR sync from: Zhang Zekun <zhangzekun11@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/QTEAS342W3GWUZ4HON7LSTQKXGLF5G3K/ 
The iova rcache will have performance problem, set the iova rcache
global mag max size to 128 to fix it.

Zhang Zekun (2):
  iommu/iova: increase the iova_rcache depot max size
  config: enable set the max iova mag size to 128


-- 
2.17.1
 
 
Link:https://gitee.com/openeuler/kernel/pulls/1244 

Reviewed-by: Zheng Zengkai <zhengzengkai@huawei.com> 
Reviewed-by: Liu Chao <liuchao173@huawei.com> 
Reviewed-by: Weilong Chen <chenweilong@huawei.com> 
Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com> 
......@@ -5950,6 +5950,7 @@ CONFIG_ARM_SMMU_V3_PM=y
# CONFIG_QCOM_IOMMU is not set
# CONFIG_VIRTIO_IOMMU is not set
CONFIG_SMMU_BYPASS_DEV=y
CONFIG_IOVA_MAX_GLOBAL_MAGS=128
#
# Remoteproc drivers
......
......@@ -437,5 +437,15 @@ config SMMU_BYPASS_DEV
This feature will be replaced by ACPI IORT RMR node, which will be
upstreamed in mainline.
config IOVA_MAX_GLOBAL_MAGS
int "Set the max iova global magzines in iova rcache"
range 16 2048
default "32"
help
Iova rcache global magizine is shared among every cpu. The size of
it can be a bottle neck when lots of cpus are contending to use it.
If you are suffering from the speed of allocing iova with more than
128 cpus, try to tune this config larger.
endif # IOMMU_SUPPORT
......@@ -26,7 +26,7 @@ struct iova_magazine;
struct iova_cpu_rcache;
#define IOVA_RANGE_CACHE_MAX_SIZE 6 /* log of max cached IOVA range size (in pages) */
#define MAX_GLOBAL_MAGS 32 /* magazines per bin */
#define MAX_GLOBAL_MAGS CONFIG_IOVA_MAX_GLOBAL_MAGS /* magazines per bin */
struct iova_rcache {
spinlock_t lock;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册