[PATCH] mm/gup_benchmark: GUP_BENCHMARK depends on DEBUG_FS

From: Barry Song
Date: Wed Nov 04 2020 - 05:09:58 EST


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_BENCHMARK can do nothing without DEBUG_FS.

Cc: John Hubbard <jhubbard@xxxxxxxxxx>
Cc: Ralph Campbell <rcampbell@xxxxxxxxxx>
Inspired-by: John Garry <john.garry@xxxxxxxxxx>
Signed-off-by: Barry Song <song.bao.hua@xxxxxxxxxxxxx>
---
* inspired by John's comment in this patch:
https://lore.kernel.org/linux-iommu/184797b8-512e-e3da-fae7-25c7d662648b@xxxxxxxxxx/

mm/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/mm/Kconfig b/mm/Kconfig
index d42423f..91fa923 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -836,6 +836,7 @@ config PERCPU_STATS

config GUP_BENCHMARK
bool "Enable infrastructure for get_user_pages() and related calls benchmarking"
+ depends on DEBUG_FS
help
Provides /sys/kernel/debug/gup_benchmark that helps with testing
performance of get_user_pages() and related calls.
--
2.7.4