projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0dd8666
)
tools/testing/selftests/vm/gup_benchmark.c: add MAP_HUGETLB option
author
Keith Busch
<
[email protected]
>
Fri, 26 Oct 2018 22:10:12 +0000
(15:10 -0700)
committer
Linus Torvalds
<
[email protected]
>
Fri, 26 Oct 2018 23:38:15 +0000
(16:38 -0700)
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]
>
tools/testing/selftests/vm/gup_benchmark.c
patch
|
blob
|
history
diff --git
a/tools/testing/selftests/vm/gup_benchmark.c
b/tools/testing/selftests/vm/gup_benchmark.c
index 5c8e4cb1441afc51460c9249dd8e81ee3f8974a0..880b96fc80d4cabea168a1fb4e9bc5e828c4b0d5 100644
(file)
--- 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:tTLUS
H
")) != -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;
}