lkml.org 
[lkml]   [2012]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 2/2] mm: show zone lruvec state in /proc/zoneinfo
From
Date
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
---
mm/vmstat.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/mm/vmstat.c b/mm/vmstat.c
index 2c813e1..2e77a19 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -20,6 +20,8 @@
#include <linux/writeback.h>
#include <linux/compaction.h>

+#include "internal.h"
+
#ifdef CONFIG_VM_EVENT_COUNTERS
DEFINE_PER_CPU(struct vm_event_state, vm_event_states) = {{0}};
EXPORT_PER_CPU_SYMBOL(vm_event_states);
@@ -1020,6 +1022,27 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
"\n start_pfn: %lu",
zone->all_unreclaimable,
zone->zone_start_pfn);
+ seq_printf(m, "\n lruvecs");
+ for_each_lruvec_id(i) {
+ struct lruvec *lruvec = zone->lruvec + i;
+ enum lru_list lru;
+
+ seq_printf(m,
+ "\n lruvec: %i",
+ i);
+ for_each_lru(lru)
+ seq_printf(m,
+ "\n %s: %lu",
+ vmstat_text[NR_LRU_BASE + lru],
+ lruvec->pages_count[lru]);
+ seq_printf(m,
+ "\n %s: %lu"
+ "\n %s: %lu",
+ vmstat_text[NR_ISOLATED_ANON],
+ lruvec->pages_count[LRU_ISOLATED_ANON],
+ vmstat_text[NR_ISOLATED_FILE],
+ lruvec->pages_count[LRU_ISOLATED_FILE]);
+ }
seq_putc(m, '\n');
}



\
 
 \ /
  Last update: 2012-02-23 19:51    [W:0.283 / U:4.188 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site