public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Bryn M. Reeves" <bmr@redhat.com>
To: "\"Kai Mäkisara (Kolumbus)\"" <kai.makisara@kolumbus.fi>
Cc: Laurence Oberman <loberman@redhat.com>,
	Laurence Oberman <oberman.l@gmail.com>,
	Shane M Seymour <shane.seymour@hp.com>,
	linux-scsi@vger.kernel.org,
	"James E.J. Bottomley (JBottomley@parallels.com)"
	<JBottomley@parallels.com>,
	jeffm@suse.com
Subject: Re: [PATCH] st: implement sysfs based tape statistics v2
Date: Thu, 5 Feb 2015 18:50:40 +0000	[thread overview]
Message-ID: <20150205185040.GB9303@localhost.localdomain> (raw)
In-Reply-To: <E267A9CB-6A91-4DD6-9BEE-D0DC6C048B07@kolumbus.fi>

On Thu, Feb 05, 2015 at 07:46:32PM +0200, "Kai Mäkisara (Kolumbus)" wrote:
> > On 5.2.2015, at 19.40, Laurence Oberman <loberman@redhat.com> wrote:
> > From: "Kai Mäkisara (Kolumbus)" <kai.makisara@kolumbus.fi>
> > I still think that the tape statistics should be exported like the statistics of “real” block devices, i.e., one sysfs file exporting on a single line the statistics that temporally belong together. James rejected this approach. I am leaving the decision about this code to him. I will neither ack nor nak this code.
> > 
> > I missed the earlier conversations with James, I will go search for them.
> > Do you mean add them so they are similar to the /proc/diskstats

http://comments.gmane.org/gmane.linux.scsi/80497

On Fri, Feb 22 2013 James Bottomley wrote:
>>>> I'm afraid we can't do it the way you're proposing.  files in sysfs must
>>>> conform to the one value per file rule (so we avoid the ABI nastiness
>>>> that plagues /proc).  You can create a stat directory with a bunch of
>>>> files, but not a single file that gives all values.

Documentation/filesystems/sysfs.txt does not agree:

  "Attributes should be ASCII text files, preferably with only one value
  per file. It is noted that it may not be efficient to contain only one
  value per file, so it is socially acceptable to express an array of
  values of the same type."

There's also ample precedent for this: sysfs disk and partition stats,
SELinux cache and hash table stats (which have a pretty yucky 2d int
array with column headers and a name: val format respectively).

There's also a bunch of multivariate name=value format stats files in
the cgroups sysfs tree.

> Not exactly. I mean the data exported in sysfs, for example:
> 
> > cat /sys/block/sda/sda1/stat
>   159740     9006  5941506    64461   124724    55907 12772208  3598677        0   299875  3663235

I'd prefer to consume tape stats in this format too; it follows the
principle of least surprise since it's shared with every other IO stats
source (including device-mapper statistics) and it simplifies handling
the counters in user space.

Regards,
Bryn.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-02-05 18:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13  3:43 [PATCH] st: implement sysfs based tape statistics v2 Seymour, Shane M
2015-01-27  0:11 ` Seymour, Shane M
2015-02-06 17:49   ` Jeremy Linton
2015-02-02 15:16 ` Laurence Oberman
2015-02-05 17:03   ` "Kai Mäkisara (Kolumbus)"
2015-02-05 17:40     ` Laurence Oberman
2015-02-05 17:46       ` "Kai Mäkisara (Kolumbus)"
2015-02-05 18:12         ` Laurence Oberman
2015-02-05 18:43         ` James Bottomley
2015-02-05 18:50         ` Bryn M. Reeves [this message]
2015-02-05 18:55           ` James Bottomley
2015-02-05 18:57             ` Bryn M. Reeves
2015-02-08 17:07 ` Dale R. Worley
2015-02-08 23:19   ` Seymour, Shane M
2015-02-11  3:38     ` Dale R. Worley
2015-02-09  6:00   ` Seymour, Shane M
2015-02-09 19:14     ` "Kai Mäkisara (Kolumbus)"

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=20150205185040.GB9303@localhost.localdomain \
    --to=bmr@redhat.com \
    --cc=JBottomley@parallels.com \
    --cc=jeffm@suse.com \
    --cc=kai.makisara@kolumbus.fi \
    --cc=linux-scsi@vger.kernel.org \
    --cc=loberman@redhat.com \
    --cc=oberman.l@gmail.com \
    --cc=shane.seymour@hp.com \
    /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