forked from torvalds/linux
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mm: add thp_utilization metrics to /proc/thp_utilization
THPs have historically been enabled on a per application basis due to performance increase or decrease depending on how the particular application uses physical memory. When THPs are heavily utilized, application performance improves due to fewer TLB cache misses. It has long been suspected that performance regressions when THP is enabled happens due to heavily underutilized anonymous THPs. Previously there was no way to track how much of a THP is actually being used. With this change, we seek to gain visibility into the utilization of THPs in order to make more intelligent decisions regarding paging. This change introduces a tool that scans through all of physical memory for anonymous THPs and groups them into buckets based on utilization. It also includes an interface under /proc/thp_utilization. Utilization of a THP is defined as the percentage of nonzero pages in the THP. The worker thread will scan through all of physical memory and obtain utilization of all anonymous THPs. It will gather this information by periodically scanning through all of physical memory for anonymous THPs, group them into buckets based on utilization, and report utilization information through /proc/thp_utilization. Signed-off-by: Alexander Zhu <alexlzhu@fb.com>
- Loading branch information
1 parent
9e2f402
commit c3896ed
Showing
4 changed files
with
204 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters