[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20121012101932.GA30179@lizard>
Date: Fri, 12 Oct 2012 03:19:32 -0700
From: Anton Vorontsov <anton.vorontsov@...aro.org>
To: Pekka Enberg <penberg@...nel.org>
Cc: Leonid Moiseichuk <leonid.moiseichuk@...ia.com>,
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] mm: vmevent: Report number of used swap pages, not total
amount of swap
I think the actual intent was to report the number of used swap pages, not
just total swap size.
This patch fixes the issue.
Signed-off-by: Anton Vorontsov <anton.vorontsov@...aro.org>
---
mm/vmevent.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/vmevent.c b/mm/vmevent.c
index 1c2e72e..a059bed 100644
--- a/mm/vmevent.c
+++ b/mm/vmevent.c
@@ -46,7 +46,7 @@ static u64 vmevent_attr_swap_pages(struct vmevent_watch *watch,
si_swapinfo(&si);
- return si.totalswap;
+ return si.totalswap - si.freeswap;
#else
return 0;
#endif
--
1.7.12.1
--
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