mbox series

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

Message ID 20191021212435.398153-1-jhubbard@nvidia.com (mailing list archive)
Headers show
Series mm/gup_benchmark: fix MAP_HUGETLB case | expand

Message

John Hubbard Oct. 21, 2019, 9:24 p.m. UTC
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(-)