* [PATCH v1] ubifs: support page statistics in vmstat
@ 2019-07-18 12:03 Stanley Chu
2019-07-21 20:15 ` Richard Weinberger
0 siblings, 1 reply; 3+ messages in thread
From: Stanley Chu @ 2019-07-18 12:03 UTC (permalink / raw)
To: linux-mtd, richard, dedekind1, adrian.hunter, matthias.bgg
Cc: linger.lee, chienwei.chang, kuohong.wang, linux-mediatek,
Stanley Chu, linux-arm-kernel
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 <stanley.chu@mediatek.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] ubifs: support page statistics in vmstat
2019-07-18 12:03 [PATCH v1] ubifs: support page statistics in vmstat Stanley Chu
@ 2019-07-21 20:15 ` Richard Weinberger
2019-09-15 22:05 ` Richard Weinberger
0 siblings, 1 reply; 3+ messages in thread
From: Richard Weinberger @ 2019-07-21 20:15 UTC (permalink / raw)
To: Stanley Chu
Cc: linger.lee, Artem Bityutskiy, Richard Weinberger, kuohong.wang,
Adrian Hunter, linux-mtd, chienwei.chang, matthias.bgg,
linux-mediatek, linux-arm-kernel
On Thu, Jul 18, 2019 at 2:04 PM Stanley Chu <stanley.chu@mediatek.com> wrote:
>
> 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.
While I think updating these counter for raw flash makes sense,
I wonder whether UBIFS is the right layer.
Why not directly in MTD or at least UBI?
--
Thanks,
//richard
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] ubifs: support page statistics in vmstat
2019-07-21 20:15 ` Richard Weinberger
@ 2019-09-15 22:05 ` Richard Weinberger
0 siblings, 0 replies; 3+ messages in thread
From: Richard Weinberger @ 2019-09-15 22:05 UTC (permalink / raw)
To: Stanley Chu
Cc: linger.lee, Artem Bityutskiy, Richard Weinberger, kuohong.wang,
Adrian Hunter, linux-mtd, chienwei.chang, matthias.bgg,
linux-mediatek, linux-arm-kernel
On Sun, Jul 21, 2019 at 10:15 PM Richard Weinberger
<richard.weinberger@gmail.com> wrote:
>
> On Thu, Jul 18, 2019 at 2:04 PM Stanley Chu <stanley.chu@mediatek.com> wrote:
> >
> > 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.
>
> While I think updating these counter for raw flash makes sense,
> I wonder whether UBIFS is the right layer.
> Why not directly in MTD or at least UBI?
Ping?
--
Thanks,
//richard
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-15 22:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-18 12:03 [PATCH v1] ubifs: support page statistics in vmstat Stanley Chu
2019-07-21 20:15 ` Richard Weinberger
2019-09-15 22:05 ` Richard Weinberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).