[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1338553446-22292-3-git-send-email-anton.vorontsov@linaro.org>
Date: Fri, 1 Jun 2012 05:24:04 -0700
From: Anton Vorontsov <anton.vorontsov@...aro.org>
To: Pekka Enberg <penberg@...nel.org>
Cc: Leonid Moiseichuk <leonid.moiseichuk@...ia.com>,
KOSAKI Motohiro <kosaki.motohiro@...il.com>,
Minchan Kim <minchan@...nel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
John Stultz <john.stultz@...aro.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linaro-kernel@...ts.linaro.org,
patches@...aro.org, kernel-team@...roid.com
Subject: [PATCH 3/5] vmevent: Refresh vmstats before sampling
On SMP, kernel updates vmstats only once per second, which makes vmevent
unusable. Let's fix it by updating vmstats before sampling.
Reported-by: KOSAKI Motohiro <kosaki.motohiro@...il.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@...aro.org>
---
mm/vmevent.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/mm/vmevent.c b/mm/vmevent.c
index 4ca2a04..35fd0d5 100644
--- a/mm/vmevent.c
+++ b/mm/vmevent.c
@@ -2,6 +2,7 @@
#include <linux/atomic.h>
#include <linux/compiler.h>
#include <linux/vmevent.h>
+#include <linux/mm.h>
#include <linux/syscalls.h>
#include <linux/workqueue.h>
#include <linux/file.h>
@@ -163,6 +164,9 @@ static void vmevent_sample(struct vmevent_watch *watch)
if (atomic_read(&watch->pending))
return;
+
+ refresh_vm_stats();
+
if (!vmevent_match(watch))
return;
--
1.7.9.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists