summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaura Abbott <lauraa@codeaurora.org>2014-09-22 13:26:28 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:03:15 -0700
commit416cca9db2a961221ce0d8848fad2ab2ddeb6c30 (patch)
tree7173361c5653d52efe3b7e11404bd38fe5272067 /include
parentf41560721c438d77b2a86c91a6ea363c191558a0 (diff)
mm: Add notifier framework for showing memory
There are many drivers in the kernel which can hold on to lots of memory. It can be useful to dump out all those drivers at key points in the kernel. Introduct a notifier framework for dumping this information. When the notifiers are called, drivers can dump out the state of any memory they may be using. Change-Id: Ifb2946964bf5d072552dd56d8d6dfdd794af6d84 Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/show_mem_notifier.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/show_mem_notifier.h b/include/linux/show_mem_notifier.h
new file mode 100644
index 000000000000..b1265f87edec
--- /dev/null
+++ b/include/linux/show_mem_notifier.h
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/notifier.h>
+
+int show_mem_notifier_register(struct notifier_block *nb);
+
+int show_mem_notifier_unregister(struct notifier_block *nb);
+
+void show_mem_call_notifiers(void);