diff options
author | Keith Busch <[email protected]> | 2018-10-26 15:10:12 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2018-10-26 16:38:15 -0700 |
commit | 3821b76c3cdb5f2c5ef1b082de79829e8ff50a7d (patch) | |
tree | 40d7816b202d8873420e932c83585cf0339163f6 | |
parent | 0dd8666afb99c71d124e0c2abf1ad7d934a242a0 (diff) |
tools/testing/selftests/vm/gup_benchmark.c: add MAP_HUGETLB option
Add a new option '-H' to the gup benchmark to help understand how hugetlb
mapping pages compare with the default.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Keith Busch <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Cc: Kirill Shutemov <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Dan Williams <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | tools/testing/selftests/vm/gup_benchmark.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/testing/selftests/vm/gup_benchmark.c b/tools/testing/selftests/vm/gup_benchmark.c index 5c8e4cb1441a..880b96fc80d4 100644 --- a/tools/testing/selftests/vm/gup_benchmark.c +++ b/tools/testing/selftests/vm/gup_benchmark.c @@ -36,7 +36,7 @@ int main(int argc, char **argv) char *file = "/dev/zero"; char *p; - while ((opt = getopt(argc, argv, "m:r:n:f:tTLUS")) != -1) { + while ((opt = getopt(argc, argv, "m:r:n:f:tTLUSH")) != -1) { switch (opt) { case 'm': size = atoi(optarg) * MB; @@ -69,6 +69,9 @@ int main(int argc, char **argv) flags &= ~MAP_PRIVATE; flags |= MAP_SHARED; break; + case 'H': + flags |= MAP_HUGETLB; + break; default: return -1; } |