summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Kconfig.debug7
-rw-r--r--mm/page_owner.c6
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 9e27a3c3aeb4..902846958945 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -255,6 +255,13 @@ config PAGE_OWNER
If unsure, say N.
+config PAGE_OWNER_ENABLE_DEFAULT
+ bool "Enable Track page owner by default"
+ depends on PAGE_OWNER
+ ---help---
+ Enable track page owner by default? This value
+ can be overridden by page_owner_disabled=off|on.
+
config DEBUG_FS
bool "Debug Filesystem"
help
diff --git a/mm/page_owner.c b/mm/page_owner.c
index 983c3a10fa07..45cccaa1ce32 100644
--- a/mm/page_owner.c
+++ b/mm/page_owner.c
@@ -7,7 +7,8 @@
#include <linux/page_owner.h>
#include "internal.h"
-static bool page_owner_disabled = true;
+static bool page_owner_disabled =
+ !IS_ENABLED(CONFIG_PAGE_OWNER_ENABLE_DEFAULT);
bool page_owner_inited __read_mostly;
static void init_early_allocated_pages(void);
@@ -20,6 +21,9 @@ static int early_page_owner_param(char *buf)
if (strcmp(buf, "on") == 0)
page_owner_disabled = false;
+ if (strcmp(buf, "off") == 0)
+ page_owner_disabled = true;
+
return 0;
}
early_param("page_owner", early_page_owner_param);