[PATCH 0/1] mm/gup_benchmark: fix MAP_HUGETLB case

From: John Hubbard
Date: Mon Oct 21 2019 - 17:24:45 EST


Hi,

Here's another gup_benchmark.c fix, which I ran into while adding
support for the upcoming FOLL_PIN work. Anyway, the problem is
clearly described in the patch commit description, and the fix seems
like the best way to me, but the fix is not *completely* black and
white.

This fix forces MAP_ANONYMOUS for the MAP_HUGETLB case. However,
another way to do it might be to mmap() against a valid hugetlb
page file, instead of /dev/zero. But that seems like a lot of
trouble and if I'm reading the intent correctly, MAP_ANONYMOUS
is what's desired anyway.

John Hubbard (1):
mm/gup_benchmark: fix MAP_HUGETLB case

tools/testing/selftests/vm/gup_benchmark.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--
2.23.0