diff options
author | Geert Uytterhoeven <[email protected]> | 2020-12-15 20:43:01 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2020-12-15 22:46:16 -0800 |
commit | 0ae446e4b91b5a713fb189cf7f23d1a303057fd9 (patch) | |
tree | b5251dc5a29b9e41cdc4b4b558fbddcd64fdbbd2 | |
parent | ab7d7798dad5aae23bb502f1a6fc0d637b07dc47 (diff) |
lib/test_free_pages.c: add basic progress indicators
The test module to check that free_pages() does not leak memory does not
provide any feedback whatsoever its state or progress, but may take some
time on slow machines. Add the printing of messages upon starting each
phase of the test, and upon completion.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | lib/test_free_pages.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/test_free_pages.c b/lib/test_free_pages.c index 074e76bd76b2..25ae1ac2624a 100644 --- a/lib/test_free_pages.c +++ b/lib/test_free_pages.c @@ -5,6 +5,8 @@ * Author: Matthew Wilcox <[email protected]> */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/gfp.h> #include <linux/mm.h> #include <linux/module.h> @@ -26,8 +28,11 @@ static void test_free_pages(gfp_t gfp) static int m_in(void) { + pr_info("Testing with GFP_KERNEL\n"); test_free_pages(GFP_KERNEL); + pr_info("Testing with GFP_KERNEL | __GFP_COMP\n"); test_free_pages(GFP_KERNEL | __GFP_COMP); + pr_info("Test completed\n"); return 0; } |