Repository navigation
Commit 6b7b90e
committed
mm: thp: use single linked list for THP page table page deposit.
The old design uses the double linked list page->lru to chain all
deposited page table pages when creating a THP and page->pmd_huge_pte
to point to the first page of the list. As the second pointer in
page->lru overlaps with page->pmd_huge_pte, the design prevents
multi-level page table page deposit, which is useful for PUD and higher
level THPs.
The new design uses single linked list, where deposit_head points to
a single linked list of deposited pages and deposit_node can be used to
deposit the page itself to another list. For example, this allows us to
have one PUD page points to a list of PMD pages, each of which points
a list of PTE pages to support PUD level THP.
Signed-off-by: Zi Yan <ziy@nvidia.com>1 parent ab5018a commit 6b7b90e
4 files changed
Lines changed: 17 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
2260 | 2261 | | |
2261 | 2262 | | |
2262 | 2263 | | |
2263 | | - | |
| 2264 | + | |
2264 | 2265 | | |
2265 | 2266 | | |
2266 | 2267 | | |
2267 | 2268 | | |
2268 | 2269 | | |
2269 | 2270 | | |
2270 | 2271 | | |
2271 | | - | |
| 2272 | + | |
2272 | 2273 | | |
2273 | 2274 | | |
2274 | 2275 | | |
2275 | 2276 | | |
2276 | | - | |
| 2277 | + | |
2277 | 2278 | | |
2278 | 2279 | | |
2279 | 2280 | | |
| |||
2285 | 2286 | | |
2286 | 2287 | | |
2287 | 2288 | | |
2288 | | - | |
| 2289 | + | |
2289 | 2290 | | |
2290 | 2291 | | |
2291 | 2292 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
147 | | - | |
148 | | - | |
| 148 | + | |
| 149 | + | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
| |||
526 | 527 | | |
527 | 528 | | |
528 | 529 | | |
529 | | - | |
| 530 | + | |
| 531 | + | |
530 | 532 | | |
531 | 533 | | |
532 | 534 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
666 | | - | |
| 666 | + | |
667 | 667 | | |
668 | 668 | | |
669 | 669 | | |
| |||
1029 | 1029 | | |
1030 | 1030 | | |
1031 | 1031 | | |
1032 | | - | |
| 1032 | + | |
1033 | 1033 | | |
1034 | 1034 | | |
1035 | 1035 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
| 167 | + | |
172 | 168 | | |
173 | 169 | | |
174 | 170 | | |
| |||
180 | 176 | | |
181 | 177 | | |
182 | 178 | | |
| 179 | + | |
| 180 | + | |
183 | 181 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
| 182 | + | |
| 183 | + | |
189 | 184 | | |
190 | 185 | | |
191 | 186 | | |
| |||
0 commit comments