Commit 876b598e authored by Zhang Zekun's avatar Zhang Zekun
Browse files

iommu/iova: Make the rcache depot scale better

mainline inclusion
from mainline-v6.7-rc1
commit 911aa1245da83ff5e76d33bb612d8b5a3f2ec4a5
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8KS9A
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=911aa1245da83ff5e76d33bb612d8b5a3f2ec4a5



--------------------------------------

The algorithm in the original paper specifies the storage of full
magazines in the depot as an unbounded list rather than a fixed-size
array. It turns out to be pretty straightforward to do this in our
implementation with no significant loss of efficiency. This allows
the depot to scale up to the working set sizes of larger systems,
while also potentially saving some memory on smaller ones too.

Since this involves touching struct iova_magazine with the requisite
care, we may as well reinforce the comment with a proper assertion too.

Reviewed-by: default avatarJohn Garry <john.g.garry@oracle.com>
Reviewed-by: default avatarJerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/f597aa72fc3e1d315bc4574af0ce0ebe5c31cd22.1694535580.git.robin.murphy@arm.com


Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
Signed-off-by: default avatarZhang Zekun <zhangzekun11@huawei.com>
parent 26164f20
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment