Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1443632
| From | nwatters@codeaurora.org |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] iommu/arm-smmu-v3: limit use of 2-level stream tables |
| Date | 2016-07-14 19:40 +0200 |
| Message-ID | <rUSMa-4cH-43@gated-at.bofh.it> (permalink) |
| References | <rTNOx-29b-11@gated-at.bofh.it> <rUaBr-bK-3@gated-at.bofh.it> <rUP1T-1Qz-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 2016-07-14 09:31, Will Deacon wrote: > On Tue, Jul 12, 2016 at 02:19:20PM -0400, Nate Watterson wrote: >> In the current arm-smmu-v3 driver, all smmus that support 2-level >> stream tables are being forced to use them. This is suboptimal for >> smmus that support fewer stream id bits than would fill in a single >> second level table. This patch limits the use of 2-level tables to >> smmus that both support the feature and whose first level table can >> possibly contain more than a single entry. > > Just to be clear, what exactly are you seeing as being suboptimal here? > Is it the memory wastage from overallocating the L2 table, or something > more? Disregarding the config cache, fetching an STE when 2-level tables are being used will require the hw to perform more memory accesses than it would have to with a linear table since the L1 descriptor must also be fetched. Presumably this is why the spec states, "ARM recommends that a more efficient linear table is used instead of programming SPLIT > LOG2SIZE". My understanding is that the only benefit to using 2-level tables is that it can save space when stream ids are sparsely distributed. Are there any other compelling reasons to use them? > > if it's just the memory allocation, I'd sooner restrict the span field > in the L1 desc. Although I am not especially concerned about the memory allocation, even if the span was reduced, we would still be wasting a page for the L1 table unless L1 and L2 tables were allocated in a single dmam_alloc_coherent call. > > Will Nate -- Qualcomm Datacenter Technologies, Inc. on behalf of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] iommu/arm-smmu-v3: limit use of 2-level stream tables Nate Watterson <nwatters@codeaurora.org> - 2016-07-11 20:10 +0200
Re: [PATCH] iommu/arm-smmu-v3: limit use of 2-level stream tables Robin Murphy <robin.murphy@arm.com> - 2016-07-12 11:40 +0200
[PATCH v2] iommu/arm-smmu-v3: limit use of 2-level stream tables Nate Watterson <nwatters@codeaurora.org> - 2016-07-12 20:30 +0200
Re: [PATCH v2] iommu/arm-smmu-v3: limit use of 2-level stream tables Will Deacon <will.deacon@arm.com> - 2016-07-14 15:40 +0200
Re: [PATCH v2] iommu/arm-smmu-v3: limit use of 2-level stream tables nwatters@codeaurora.org - 2016-07-14 19:40 +0200
csiph-web