devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC v2 1/2] dt-bindings: iommu: Document iova-best-fit property for IOMMU masters
@ 2022-12-12 21:51 Georgi Djakov
  2022-12-12 21:51 ` [RFC v2 2/2] iommu/iova: Add support for best-fit algorithm Georgi Djakov
  2022-12-13 16:35 ` [RFC v2 1/2] dt-bindings: iommu: Document iova-best-fit property for IOMMU masters Rob Herring
  0 siblings, 2 replies; 3+ messages in thread
From: Georgi Djakov @ 2022-12-12 21:51 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, devicetree
  Cc: joro, will, robin.murphy, iommu, linux-kernel, djakov

Document the "iova-best-fit" device-tree property, which is used to
describe that the iommu master is constrained on memory and the system
must put more effort when allocating IOVAs to avoid holes/gaps in
memory. This improves the memory utilization and helps with memory
fragmentation issues in some cases, but it could take longer to allocate
an IOVA compared with the default "first-fit" algorithm.

Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com>
---
 Documentation/devicetree/bindings/iommu/iommu.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/iommu/iommu.txt b/Documentation/devicetree/bindings/iommu/iommu.txt
index 26ba9e530f13..ca1b4813c5bf 100644
--- a/Documentation/devicetree/bindings/iommu/iommu.txt
+++ b/Documentation/devicetree/bindings/iommu/iommu.txt
@@ -88,6 +88,10 @@ prevent any driver from properly setting up the translations.
 
 Optional properties:
 --------------------
+- iova-best-fit: When present, the best-fit algorithm will be used, instead
+  of first-fit. This reduces memory fragmentation when allocating IOVAs in
+  some cases, but may also increase the time it takes to allocate an IOVA.
+
 - pasid-num-bits: Some masters support multiple address spaces for DMA, by
   tagging DMA transactions with an address space identifier. By default,
   this is 0, which means that the device only has one address space.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-13 16:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-12 21:51 [RFC v2 1/2] dt-bindings: iommu: Document iova-best-fit property for IOMMU masters Georgi Djakov
2022-12-12 21:51 ` [RFC v2 2/2] iommu/iova: Add support for best-fit algorithm Georgi Djakov
2022-12-13 16:35 ` [RFC v2 1/2] dt-bindings: iommu: Document iova-best-fit property for IOMMU masters Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).