diff options
author | Ryan Roberts <[email protected]> | 2024-01-22 12:05:54 +0000 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2024-01-25 23:52:21 -0800 |
commit | d021b442cf312664811783e92b3d5e4548e92a53 (patch) | |
tree | 033d6f1afab88e3bef6f9f37c5a3512f565f4067 /tools/perf/util/scripting-engines/trace-event-perl.c | |
parent | 6f9dc684cae638dda0570154509884ee78d0f75c (diff) |
selftests/mm: ksm_tests should only MADV_HUGEPAGE valid memory
ksm_tests was previously mmapping a region of memory, aligning the
returned pointer to a PMD boundary, then setting MADV_HUGEPAGE, but was
setting it past the end of the mmapped area due to not taking the pointer
alignment into consideration. Fix this behaviour.
Up until commit efa7df3e3bb5 ("mm: align larger anonymous mappings on THP
boundaries"), this buggy behavior was (usually) masked because the
alignment difference was always less than PMD-size. But since the
mentioned commit, `ksm_tests -H -s 100` started failing.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 325254899684 ("selftests: vm: add KSM huge pages merging time test")
Signed-off-by: Ryan Roberts <[email protected]>
Cc: Pedro Demarchi Gomes <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c')
0 files changed, 0 insertions, 0 deletions