Skip to content
Commit 9f3e87ce authored by Ryan Roberts's avatar Ryan Roberts
Browse files

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's avatarRyan Roberts <ryan.roberts@arm.com>
parent 184808d6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment