From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Davidlohr Bueso <davidlohr.bueso@hp.com>
Cc: linux-kernel@vger.kernel.org, Nitin Gupta <ngupta@vflare.org>
Subject: Re: [PATCH 2/2] zram: gather statistics in a unique file
Date: Mon, 11 Feb 2013 10:16:27 -0800 [thread overview]
Message-ID: <20130211181627.GA21390@kroah.com> (raw)
In-Reply-To: <1360606065.4204.10.camel@buesod1.americas.hpqcorp.net>
On Mon, Feb 11, 2013 at 10:07:45AM -0800, Davidlohr Bueso wrote:
> On Sun, 2013-02-10 at 21:41 -0800, Greg Kroah-Hartman wrote:
> > On Sun, Feb 10, 2013 at 08:29:06PM -0800, Davidlohr Bueso wrote:
> > > Instead of having one sysfs file per zram statistic, group them all
> > > in a single, reader-friendly, 'statistics' file. This not only reduces
> > > code but is also makes it easier to visualize. The new file looks like:
> > >
> > > Number of reads: 24
> > > Number of writes: 1055
> > > Invalid IO: 0
> > > Notify free: 0
> > > Zero pages: 1042
> > > Orig data size: 49152 bytes
> > > Compressed data: 838 bytes
> > > Total memory used: 53248 bytes
> > >
> > > Signed-off-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
> >
> > No, please, the rule for sysfs is "one value per file", not files with
> > lots of data that you need to parse.
>
> Ok.
>
> >
> > If you want to do something like this, then do it in debugfs, but NEVER
> > in sysfs.
>
> So, you would you be open to having the statistics file in debugfs and
> removing the individual files sysfs?
If these are merely debugging information, they should go to debugfs.
If they are something that all users need/want, they should stay in
sysfs as-is.
thanks,
greg k-h
next prev parent reply other threads:[~2013-02-11 18:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-11 4:29 [PATCH 2/2] zram: gather statistics in a unique file Davidlohr Bueso
2013-02-11 4:34 ` Davidlohr Bueso
2013-02-11 4:36 ` [PATCH v2 " Davidlohr Bueso
2013-02-11 5:41 ` [PATCH " Greg Kroah-Hartman
2013-02-11 18:07 ` Davidlohr Bueso
2013-02-11 18:16 ` Greg Kroah-Hartman [this message]
2013-02-11 18:50 ` Nitin Gupta
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=20130211181627.GA21390@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=davidlohr.bueso@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ngupta@vflare.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