2013-04-12 01:11:34

by Cody P Schafer

[permalink] [raw]
Subject: [PATCH] mm/vmstat: add note on safety of drain_zonestat

---
mm/vmstat.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/mm/vmstat.c b/mm/vmstat.c
index e1d8ed1..2b93877 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -495,6 +495,10 @@ void refresh_cpu_vm_stats(int cpu)
atomic_long_add(global_diff[i], &vm_stat[i]);
}

+/*
+ * this is only called if !populated_zone(zone), which implies no other users of
+ * pset->vm_stat_diff[] exsist.
+ */
void drain_zonestat(struct zone *zone, struct per_cpu_pageset *pset)
{
int i;
--
1.8.2.1