Commit 1672730
iommu/arm-smmu-v3: Change vmid alloc strategy from bitmap to ida
For current implementation of vmid allocation of arm smmu-v3, a per-smmu
devide bitmap of 64K bits(8K bytes) is allocated on behalf of possible VMID
range, which is two pages for some architectures. Besides that, its memory
consumption is 'static', despite of how many VMIDs are allocated actually.
That's memory inefficient and lack of scalability.
So an IDA based implementation is introduced to address this issue, which
is capable of self-expanding on the actual need of VMID allocation.
Signed-off-by: Dawei Li <set_pte_at@outlook.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/TYCP286MB2323E0C525FF9F94E3B07C7ACA35A@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM
Signed-off-by: Will Deacon <will@kernel.org>1 parent 6eaae19 commit 1672730
2 files changed
Lines changed: 8 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2055 | 2055 | | |
2056 | 2056 | | |
2057 | 2057 | | |
2058 | | - | |
2059 | | - | |
2060 | | - | |
2061 | | - | |
2062 | | - | |
2063 | | - | |
2064 | | - | |
2065 | | - | |
2066 | | - | |
2067 | | - | |
2068 | | - | |
2069 | | - | |
2070 | | - | |
2071 | | - | |
2072 | | - | |
2073 | | - | |
2074 | | - | |
2075 | | - | |
2076 | 2058 | | |
2077 | 2059 | | |
2078 | 2060 | | |
| |||
2093 | 2075 | | |
2094 | 2076 | | |
2095 | 2077 | | |
2096 | | - | |
| 2078 | + | |
2097 | 2079 | | |
2098 | 2080 | | |
2099 | 2081 | | |
| |||
2167 | 2149 | | |
2168 | 2150 | | |
2169 | 2151 | | |
2170 | | - | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
2171 | 2155 | | |
2172 | 2156 | | |
2173 | 2157 | | |
| |||
3098 | 3082 | | |
3099 | 3083 | | |
3100 | 3084 | | |
3101 | | - | |
3102 | | - | |
| 3085 | + | |
| 3086 | + | |
3103 | 3087 | | |
3104 | 3088 | | |
3105 | 3089 | | |
| |||
3923 | 3907 | | |
3924 | 3908 | | |
3925 | 3909 | | |
| 3910 | + | |
3926 | 3911 | | |
3927 | 3912 | | |
3928 | 3913 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
673 | | - | |
| 673 | + | |
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
| |||
0 commit comments