hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/Documentation/admin-guide/mm/transhuge.rst
....@@ -53,7 +53,7 @@
5353 collapses sequences of basic pages into huge pages.
5454
5555 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.
5757
5858 Transparent Hugepage Support maximizes the usefulness of free memory
5959 if compared to the reservation approach of hugetlbfs by allowing all
....@@ -220,6 +220,13 @@
220220 collapsed, resulting fewer pages being collapsed into
221221 THPs, and lower memory access performance.
222222
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
+
223230 Boot parameter
224231 ==============
225232
....@@ -298,8 +305,7 @@
298305
299306 thp_fault_alloc
300307 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.
303309
304310 thp_collapse_alloc
305311 is incremented by khugepaged when it has found
....@@ -310,6 +316,11 @@
310316 is incremented if a page fault fails to allocate
311317 a huge page and instead falls back to using small pages.
312318
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
+
313324 thp_collapse_alloc_failed
314325 is incremented if khugepaged found a range
315326 of pages that should be collapsed into one huge page but failed
....@@ -319,6 +330,15 @@
319330 is incremented every time a file huge page is successfully
320331 allocated.
321332
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
+
322342 thp_file_mapped
323343 is incremented every time a file huge page is mapped into
324344 user address space.