.. | .. |
---|
53 | 53 | collapses sequences of basic pages into huge pages. |
---|
54 | 54 | |
---|
55 | 55 | The THP behaviour is controlled via :ref:`sysfs <thp_sysfs>` |
---|
56 | | -interface and using madivse(2) and prctl(2) system calls. |
---|
| 56 | +interface and using madvise(2) and prctl(2) system calls. |
---|
57 | 57 | |
---|
58 | 58 | Transparent Hugepage Support maximizes the usefulness of free memory |
---|
59 | 59 | if compared to the reservation approach of hugetlbfs by allowing all |
---|
.. | .. |
---|
220 | 220 | collapsed, resulting fewer pages being collapsed into |
---|
221 | 221 | THPs, and lower memory access performance. |
---|
222 | 222 | |
---|
| 223 | +``max_ptes_shared`` specifies how many pages can be shared across multiple |
---|
| 224 | +processes. Exceeding the number would block the collapse:: |
---|
| 225 | + |
---|
| 226 | + /sys/kernel/mm/transparent_hugepage/khugepaged/max_ptes_shared |
---|
| 227 | + |
---|
| 228 | +A higher value may increase memory footprint for some workloads. |
---|
| 229 | + |
---|
223 | 230 | Boot parameter |
---|
224 | 231 | ============== |
---|
225 | 232 | |
---|
.. | .. |
---|
298 | 305 | |
---|
299 | 306 | thp_fault_alloc |
---|
300 | 307 | is incremented every time a huge page is successfully |
---|
301 | | - allocated to handle a page fault. This applies to both the |
---|
302 | | - first time a page is faulted and for COW faults. |
---|
| 308 | + allocated to handle a page fault. |
---|
303 | 309 | |
---|
304 | 310 | thp_collapse_alloc |
---|
305 | 311 | is incremented by khugepaged when it has found |
---|
.. | .. |
---|
310 | 316 | is incremented if a page fault fails to allocate |
---|
311 | 317 | a huge page and instead falls back to using small pages. |
---|
312 | 318 | |
---|
| 319 | +thp_fault_fallback_charge |
---|
| 320 | + is incremented if a page fault fails to charge a huge page and |
---|
| 321 | + instead falls back to using small pages even though the |
---|
| 322 | + allocation was successful. |
---|
| 323 | + |
---|
313 | 324 | thp_collapse_alloc_failed |
---|
314 | 325 | is incremented if khugepaged found a range |
---|
315 | 326 | of pages that should be collapsed into one huge page but failed |
---|
.. | .. |
---|
319 | 330 | is incremented every time a file huge page is successfully |
---|
320 | 331 | allocated. |
---|
321 | 332 | |
---|
| 333 | +thp_file_fallback |
---|
| 334 | + is incremented if a file huge page is attempted to be allocated |
---|
| 335 | + but fails and instead falls back to using small pages. |
---|
| 336 | + |
---|
| 337 | +thp_file_fallback_charge |
---|
| 338 | + is incremented if a file huge page cannot be charged and instead |
---|
| 339 | + falls back to using small pages even though the allocation was |
---|
| 340 | + successful. |
---|
| 341 | + |
---|
322 | 342 | thp_file_mapped |
---|
323 | 343 | is incremented every time a file huge page is mapped into |
---|
324 | 344 | user address space. |
---|