diff options
Diffstat (limited to 'Documentation/DMA-attributes.txt')
-rw-r--r-- | Documentation/DMA-attributes.txt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Documentation/DMA-attributes.txt b/Documentation/DMA-attributes.txt index 18dc52c4f2a0..e8cf9cf873b3 100644 --- a/Documentation/DMA-attributes.txt +++ b/Documentation/DMA-attributes.txt | |||
@@ -100,3 +100,29 @@ allocated by dma_alloc_attrs() function from individual pages if it can | |||
100 | be mapped as contiguous chunk into device dma address space. By | 100 | be mapped as contiguous chunk into device dma address space. By |
101 | specifying this attribute the allocated buffer is forced to be contiguous | 101 | specifying this attribute the allocated buffer is forced to be contiguous |
102 | also in physical memory. | 102 | also in physical memory. |
103 | |||
104 | DMA_ATTR_ALLOC_SINGLE_PAGES | ||
105 | --------------------------- | ||
106 | |||
107 | This is a hint to the DMA-mapping subsystem that it's probably not worth | ||
108 | the time to try to allocate memory to in a way that gives better TLB | ||
109 | efficiency (AKA it's not worth trying to build the mapping out of larger | ||
110 | pages). You might want to specify this if: | ||
111 | - You know that the accesses to this memory won't thrash the TLB. | ||
112 | You might know that the accesses are likely to be sequential or | ||
113 | that they aren't sequential but it's unlikely you'll ping-pong | ||
114 | between many addresses that are likely to be in different physical | ||
115 | pages. | ||
116 | - You know that the penalty of TLB misses while accessing the | ||
117 | memory will be small enough to be inconsequential. If you are | ||
118 | doing a heavy operation like decryption or decompression this | ||
119 | might be the case. | ||
120 | - You know that the DMA mapping is fairly transitory. If you expect | ||
121 | the mapping to have a short lifetime then it may be worth it to | ||
122 | optimize allocation (avoid coming up with large pages) instead of | ||
123 | getting the slight performance win of larger pages. | ||
124 | Setting this hint doesn't guarantee that you won't get huge pages, but it | ||
125 | means that we won't try quite as hard to get them. | ||
126 | |||
127 | NOTE: At the moment DMA_ATTR_ALLOC_SINGLE_PAGES is only implemented on ARM, | ||
128 | though ARM64 patches will likely be posted soon. | ||