Skip to content

Commit

Permalink
mm/gup_test: GUP_TEST depends on DEBUG_FS
Browse files Browse the repository at this point in the history
Without DEBUG_FS, all the code in gup_benchmark becomes meaningless.
For sure kernel provides debugfs stub while DEBUG_FS is disabled, but
the point here is that GUP_TEST can do nothing without DEBUG_FS.

[song.bao.hua@hisilicon.com: add comment as a prompt to users as commented by John and Randy]
  Link: https://lkml.kernel.org/r/20201108083732.15336-1-song.bao.hua@hisilicon.com

Link: https://lkml.kernel.org/r/20201104100552.20156-1-song.bao.hua@hisilicon.com
Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
Suggested-by: John Garry <john.garry@huawei.com>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Barry Song authored and Linus Torvalds committed Dec 15, 2020
1 parent afaa788 commit d0de824
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,7 @@ config PERCPU_STATS

config GUP_TEST
bool "Enable infrastructure for get_user_pages()-related unit tests"
depends on DEBUG_FS
help
Provides /sys/kernel/debug/gup_test, which in turn provides a way
to make ioctl calls that can launch kernel-based unit tests for
Expand All @@ -840,6 +841,9 @@ config GUP_TEST

See tools/testing/selftests/vm/gup_test.c

comment "GUP_TEST needs to have DEBUG_FS enabled"
depends on !GUP_TEST && !DEBUG_FS

config GUP_GET_PTE_LOW_HIGH
bool

Expand Down

0 comments on commit d0de824

Please sign in to comment.