summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorKiryl Shutsemau (Meta) <kas@kernel.org>2026-09-25 15:15:29 +0100
committerWill Deacon <will@kernel.org>2026-10-02 15:41:13 +0000
commitc9b493a312f3f5f92f9bb5613b0ad78eb4d2a1da (patch)
tree29593de4eadffc0d3ad23a9c41b08b775ff0e32f /tools/perf/scripts/python/stackcollapse.py
parent937bbba25930d457d95c151cbe7587ae84fdc5a8 (diff)
iommu/arm-smmu-v3: Add a cmdq_max_n_shift module parameter
The command queue depth comes straight from the maximum the hardware advertises in IDR1, which reaches megabytes of coherent DMA per queue. A system with several SMMUv3 instances pays that per instance, and the Tegra241 CMDQV pays it again for every VCMDQ it preallocates. Queue depth only bounds how many commands may be in flight before a sync. A machine driving a handful of devices, or one with a tight memory budget, has no use for the maximum, and no way to say so. Add cmdq_max_n_shift, a cap on the depth given as the log2 of the entry count, the form the hardware itself takes in the LOG2SIZE field of CMDQ_BASE. It defaults to the largest depth the driver allocates, so an unset parameter changes nothing. Decide the depth in arm_smmu_cmdq_max_n_shift(), which applies the parameter to the IDR1 value, so the queue is allocated at the requested size. The Tegra241 CMDQV sizes its VCMDQs from IDR1 itself, so route that through the same helper. Floor the request at one page worth of entries. Without the floor, a small request trips the CMDQ_BATCH_ENTRIES check in arm_smmu_device_hw_probe() and the SMMU fails to probe. The floor also costs nothing: coherent DMA is page granular, so a shallower queue occupies the same memory as one that fills the page. Assisted-by: LLM Reviewed-by: Breno Leitao <leitao@debian.org> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Kiryl Shutsemau (Meta) <kas@kernel.org> Reviewed-by: Nicolin Chen <nicolinc@nvidia.com> Tested-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions