The test only recognizes VMAs that had been explicitly madvised for THP. It does not recognize VMAs that had been backed by THPs without being madvised (in THP "always" mode).
That is because the test only scans for the VM_xx flags. So it misses VMAs like this:
```
f9c00000-ffe00000 rw-p 00000000 00:00 0
Size: 100352 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Rss: 100352 kB
Pss: 100352 kB
Shared_Clean: 0 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 100352 kB
Referenced: 100352 kB
Anonymous: 100352 kB
LazyFree: 0 kB
AnonHugePages: 100352 kB
ShmemPmdMapped: 0 kB
FilePmdMapped: 0 kB
Shared_Hugetlb: 0 kB
Private_Hugetlb: 0 kB
Swap: 0 kB
SwapPss: 0 kB
Locked: 0 kB
THPeligible: 1
VmFlags: rd wr mr mw me ac sd
```
The best way to go about this would be to check for "THPelegible". But we need to check in which kernel version that came, and add a fallback for older kernels.
We also could look at AnonHugePages, but that could show 0 if khugepaged is slow and lazy.
That is because the test only scans for the VM_xx flags. So it misses VMAs like this:
```
f9c00000-ffe00000 rw-p 00000000 00:00 0
Size: 100352 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Rss: 100352 kB
Pss: 100352 kB
Shared_Clean: 0 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 100352 kB
Referenced: 100352 kB
Anonymous: 100352 kB
LazyFree: 0 kB
AnonHugePages: 100352 kB
ShmemPmdMapped: 0 kB
FilePmdMapped: 0 kB
Shared_Hugetlb: 0 kB
Private_Hugetlb: 0 kB
Swap: 0 kB
SwapPss: 0 kB
Locked: 0 kB
THPeligible: 1
VmFlags: rd wr mr mw me ac sd
```
The best way to go about this would be to check for "THPelegible". But we need to check in which kernel version that came, and add a fallback for older kernels.
We also could look at AnonHugePages, but that could show 0 if khugepaged is slow and lazy.