lkml.org 
[lkml]   [2022]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH v5 4/8] mm: Display inflated memory in logs
Date
Add InflatedTotal and InflatedFree to show_mem(...) so
it is visible in the logs.

Signed-off-by: Alexander Atanasov <alexander.atanasov@virtuozzo.com>
---
lib/show_mem.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/lib/show_mem.c b/lib/show_mem.c
index 0d7585cde2a6..20b5964d498e 100644
--- a/lib/show_mem.c
+++ b/lib/show_mem.c
@@ -7,6 +7,9 @@

#include <linux/mm.h>
#include <linux/cma.h>
+#ifdef CONFIG_MEMORY_BALLOON
+#include <linux/balloon.h>
+#endif

void __show_mem(unsigned int filter, nodemask_t *nodemask, int max_zone_idx)
{
@@ -41,4 +44,9 @@ void __show_mem(unsigned int filter, nodemask_t *nodemask, int max_zone_idx)
#ifdef CONFIG_MEMORY_FAILURE
printk("%lu pages hwpoisoned\n", atomic_long_read(&num_poisoned_pages));
#endif
+#ifdef CONFIG_MEMORY_BALLOON
+ printk("Balloon InflatedTotal:%ldkB InflatedFree:%ldkB\n",
+ atomic_long_read(&mem_balloon_inflated_total_kb),
+ atomic_long_read(&mem_balloon_inflated_free_kb));
+#endif
}
--
2.31.1
\
 
 \ /
  Last update: 2022-10-19 13:49    [W:0.031 / U:1.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site