From: "Per Förlin" <per.forlin@axis.com>
To: Richard Weinberger <richard@nod.at>, Steve deRosier <derosier@gmail.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"Artem Bityutskiy" <dedekind1@gmail.com>
Subject: Re: [PATCH] UBI: Add volume read and write statistics
Date: Thu, 19 Jul 2018 10:18:43 +0000 [thread overview]
Message-ID: <1531995523724.17025@axis.com> (raw)
In-Reply-To: <1531945071019.9858@axis.com>
> > Am Dienstag, 17. Juli 2018, 17:06:12 CEST schrieb Steve deRosier:
> > > > > While having a cup of coffee I thought more about this.
> > > > > Actually both, MTD and UBI makes sense.
> > > > > The most important issue is that you integrate it with the existing diskstats.
> > > > > So instead of having our own interface feeding MTD/UBI stats into diskstats
> > > > > would be nice. Did you look into that? I'm not sure how much work this would be.
> > > > > That way users can use existing tools such as iostat...
> > > > I actually started out looking for the information under diskstats,
> > > > then I learned it's only for block devices. I took a quick glance at
> > > > it before I went for the sys implementation instead. diskstats is
> > > > separated from the MTD and UBI stuff and I don't know if one can make a
> > > > connection to MTD/UBI somehow. I will take a closer look at this.
> > >
> > > Perhaps it was "only for block devices" because no one ever
> > > implemented the necessary hooks in MTD or UBI? I don't know the
> > > history, nor the information you found, just making a stab in the
> > > dark.
> > >
> > > If UBI and/or MTD can provide the statistics that diskstats needs in a
> > > interpretation that makes sense, why not go that way?
> >
> > Yeah, that's what I have in mind. Maybe we can easily teach diskstats
> > about MTD.
> Now I got the chance to look at this again. It's not as bad as I thought.
> The diskstats simply takes the block class and iterate over all devices.
> For each device statistics are printed out.
> It should be possible to do the same for the MTD class and the UBI class.
> So far I haven't tested anything just reading code.
> Then it's a matter of taste. Is MTD and UBI stats welcome in genhd.c?
>
> I will try to find time the coming days or so to make a prove of concept
> implementation to get a better idea of how big the change would be.
I made one observation. The stats in disktats also exists under
/sys/class/block for every device.
Actually it's the stat under /sys that is also available in diskstats.
For instance:
cat /sys/class/block/sda/stat
220 86 10682 830 14 4 128 110
0 680 940
This format is documented in iostats.txt
The first step could be to only add it under /sys/class/ubi
and /sys/class/mtd.
I'm not sure how to add all these metrics my patch only adds 4 of them.
"Unsupported values" could be set to 0 for now.
I will continue to think about how to integrate with diskstats but
I'm also in favor of adding this support in incremental steps.
prev parent reply other threads:[~2018-07-19 10:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 10:30 [PATCH] UBI: Add volume read and write statistics Per Forlin
2018-07-17 10:39 ` Richard Weinberger
2018-07-17 12:08 ` Per Förlin
2018-07-17 14:34 ` Richard Weinberger
2018-07-17 15:01 ` Per Förlin
2018-07-17 15:06 ` Steve deRosier
2018-07-17 15:10 ` Richard Weinberger
2018-07-18 20:17 ` Per Förlin
2018-07-19 10:18 ` Per Förlin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1531995523724.17025@axis.com \
--to=per.forlin@axis.com \
--cc=dedekind1@gmail.com \
--cc=derosier@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.