Currently PGPGIN and PGPGOUT statistics in vmstat is only
hooked in submit_bio() for block device I/O path.
This patch adds this feature for ubifs as well.
Change-Id: I8505bd2a7aa9eadc6abcd68b7d8b870752e71339
Signed-off-by: Stanley Chu <redacted>
---
fs/ubifs/file.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index 512e7d9c60cd..ffe7ce77f389 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -902,6 +902,8 @@ static int ubifs_bulk_read(struct page *page)
static int ubifs_readpage(struct file *file, struct page *page)
{
+ count_vm_events(PGPGIN, PAGE_CACHE_SIZE >> 9);
+
if (ubifs_bulk_read(page))
return 0;
do_readpage(page);@@ -1032,6 +1034,8 @@ static int ubifs_writepage(struct page *page, struct writeback_control *wbc)
goto out_unlock;
}
+ count_vm_events(PGPGOUT, PAGE_CACHE_SIZE >> 9);
+
spin_lock(&ui->ui_lock);
synced_i_size = ui->synced_i_size;
spin_unlock(&ui->ui_lock);
--
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel