Skip to content
Snippets Groups Projects
Commit 0ae446e4 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds
Browse files

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/20201018140445.20972-1-geert@linux-m68k.org


Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ab7d7798
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
* Author: Matthew Wilcox <willy@infradead.org> * Author: Matthew Wilcox <willy@infradead.org>
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/gfp.h> #include <linux/gfp.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -26,8 +28,11 @@ static void test_free_pages(gfp_t gfp) ...@@ -26,8 +28,11 @@ static void test_free_pages(gfp_t gfp)
static int m_in(void) static int m_in(void)
{ {
pr_info("Testing with GFP_KERNEL\n");
test_free_pages(GFP_KERNEL); test_free_pages(GFP_KERNEL);
pr_info("Testing with GFP_KERNEL | __GFP_COMP\n");
test_free_pages(GFP_KERNEL | __GFP_COMP); test_free_pages(GFP_KERNEL | __GFP_COMP);
pr_info("Test completed\n");
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment