summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/page_io.c2
-rw-r--r--mm/vmstat.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/mm/page_io.c b/mm/page_io.c
index cea438b66bce..e4fa7ffffe8b 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -704,6 +704,7 @@ void swap_write_submit(struct swap_io_ctx *ctx)
{
if (!ctx->sio)
return;
+ count_vm_events(NRSWPOUT, 1);
ctx->sis->ops->submit_write(ctx);
ctx->sio = NULL;
ctx->sis = NULL;
@@ -713,6 +714,7 @@ void swap_read_submit(struct swap_io_ctx *ctx)
{
if (!ctx->sio)
return;
+ count_vm_events(NRSWPIN, 1);
ctx->sis->ops->submit_read(ctx);
ctx->sio = NULL;
ctx->sis = NULL;
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 7d6e61a01f51..cb57714539fb 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1502,7 +1502,11 @@ const char * const vmstat_text[] = {
#if THREAD_SIZE > 65536
[I(KSTACK_REST)] = "kstack_rest",
#endif
-#endif
+#endif /* CONFIG_DEBUG_STACK_USAGE */
+#ifdef CONFIG_SWAP
+ [I(NRSWPIN)] = "nrswpin",
+ [I(NRSWPOUT)] = "nrswpout",
+#endif /* CONFIG_SWAP */
#undef I
#endif /* CONFIG_VM_EVENT_COUNTERS */
};