selftests/mm/khugepaged: Enlighten for small-sized THP
The `collapse_max_ptes_none` test was previously failing when
small-sized THP had enabled="always". The root cause is because the test
faults in 1 page less than the threshold it set for collapsing. But when
using small-sized THP we "over allocate" and therefore the threshold is
passed, and collapse unexpectedly succeeds.
Solve this by enlightening khugepaged selftest. Add a command line
option to pass in the desired small-sized THP that should be used for
all anonymous allocations. The harness will then explicitly configure
small-sized THP as requested and modify the `collapse_max_ptes_none`
test so that it faults in the threshold minus the number of pages in the
configured small-sized THP. If no command line option is provided,
default to order 0, as per previous behaviour.
I chose to use an order in the command line interface, since this makes
the interface agnostic of base page size, making it easier to invoke
from run_vmtests.sh.
Signed-off-by:
Ryan Roberts <ryan.roberts@arm.com>
Loading
Please register or sign in to comment