From: Anand Jain <anand.jain@oracle.com>
To: dsterba@suse.cz, David Sterba <dsterba@suse.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: sysfs: export dev stats in devinfo directory
Date: Wed, 9 Jun 2021 15:43:44 +0800 [thread overview]
Message-ID: <8e255fb8-9dc2-57cf-f6e8-d1c23aa43563@oracle.com> (raw)
In-Reply-To: <20210607185556.GL31483@twin.jikos.cz>
On 8/6/21 2:55 am, David Sterba wrote:
> On Sat, Jun 05, 2021 at 06:38:16AM +0800, Anand Jain wrote:
>> On 04/06/2021 22:21, David Sterba wrote:
>>> On Fri, Jun 04, 2021 at 09:41:09PM +0800, Anand Jain wrote:
>>>> On 4/6/21 9:20 pm, David Sterba wrote:
>>>>> The device stats can be read by ioctl, wrapped by command 'btrfs device
>>>>> stats'. Provide another source where to read the information in
>>>>> /sys/fs/btrfs/FSID/devinfo/DEVID/stats .
>>>>
>>>> The planned stat here is errors stat.
>>>> So why not rename this to error_stats?
>>>
>>> I think it's commonly called device stats, dev stats, so when it's in
>>> 'devinfo' it's like it's the 'stats' for the device.
>>
>>
>>> We don't have other
>>> stats, like regarding io but in that case it would make sense to
>>> distnguish the names.
>>
>> My read_policy work (which I suppose is next on your list for review)
>
> Yeah, it's among the next things to merge once the current features
> stabilize enough.
>
>> made sense that publishing the io-stat information locally from btrfs is
>> a good idea. So that it provides clarity if the IO is skewed to a device
>> or balanced. Which is even more essential in the case of mixed device
>> types. For now IMHO, /sys/fs/btrfs/FSID/devinfo/DEVID/error_stats
>> is harmless.
>
> Agreed, I thought about the same, gathering some regular io stats, so
> the error_stats makes sense. > There's still one open question whether to
> do it all in one file or in a subdirectory error_stats/ . > The sysfs way
> is one value per file but for the stats
> I'm more inclined to follow what
> /proc/ stats do. It's more convenient to monitor stats in one file read
> than having to do 'cat error_stats/*' or with filenames as 'grep ^
> error_stats/*'.
Agreed. I prefer one file from the convenience pov. Also, block dev has
one file, the reason to represent it invariably at a given time [1]
[1] https://www.kernel.org/doc/Documentation/block/stat.txt
IMO the same applies to btrfs too.
Thanks, Anand
next prev parent reply other threads:[~2021-06-09 7:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-04 13:20 [PATCH] btrfs: sysfs: export dev stats in devinfo directory David Sterba
2021-06-04 13:23 ` David Sterba
2021-06-04 13:41 ` Anand Jain
2021-06-04 14:21 ` David Sterba
2021-06-04 22:38 ` Anand Jain
2021-06-07 18:55 ` David Sterba
2021-06-09 7:43 ` Anand Jain [this message]
2021-06-09 15:14 ` David Sterba
2021-06-04 15:13 ` kernel test robot
2021-06-04 16:27 ` kernel test robot
2021-06-09 18:24 ` Omar Sandoval
2021-06-09 18:40 ` Omar Sandoval
2021-06-09 18:50 ` David Sterba
2021-06-10 0:55 ` Omar Sandoval
2021-06-10 16:37 ` David Sterba
2021-06-10 17:54 ` Omar Sandoval
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=8e255fb8-9dc2-57cf-f6e8-d1c23aa43563@oracle.com \
--to=anand.jain@oracle.com \
--cc=dsterba@suse.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
/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 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).