From: Jack Wang <jinpu.wang@profitbricks.com>
To: James Bottomley <jbottomley@parallels.com>,
linux-scsi <linux-scsi@vger.kernel.org>
Cc: Dongsu Park <dongsu.park@profitbricks.com>,
Bart Van Assche <bvanassche@acm.org>,
Jack Wang <xjtuwjp@gmail.com>
Subject: [PATCH]export device_busy for sdev
Date: Thu, 12 Sep 2013 17:29:52 +0200 [thread overview]
Message-ID: <5231DDF0.6020104@profitbricks.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1585 bytes --]
Hi James,
Attached please find patch for export device_busy for sdev.
The reason I do this is:
Sometime we see doing IO on several devices, on device may starve
others, eg:
I run fio on top the 4 disks exported by scst using srp:
(SRP default can_queue/cmd_per_lun is 62)
/dev/sdb: (g=0): rw=randread, bs=4K-16K/4K-16K/4K-16K, ioenine=libaio,
iodepth=64
/dev/sdc: (g=0): rw=randread, bs=4K-16K/4K-16K/4K-16K, ioengine=libaio,
iodepth=64
/dev/sdd: (g=0): rw=randread, bs=4K-16K/4K-16K/4K-16K, ioengine=libaio,
iodepth=64
> sdb: ios=16393/0, merge=2770/0, ticks=863050/0, in_queue=870110, util=99.43%
> sdc: ios=5896/0, merge=0/0, ticks=997110/0, in_queue=1006470, util=99.52%
> sdd: ios=15976/0, merge=0/0, ticks=978850/0, in_queue=984960, util=99.38%
A monitor to read device_busy every seconds show:
> Sleeping for 1 seconds...
> Getting device busy data for sdb 0 (tstamp=20130912172053)...
> Getting device busy data for sdc 62 (tstamp=20130912172053)...
> Getting device busy data for sde 0 (tstamp=20130912172053)...
>
> Sleeping for 1 seconds...
> Getting device busy data for sdb 0 (tstamp=20130912172054)...
> Getting device busy data for sdc 62 (tstamp=20130912172054)...
> Getting device busy data for sde 0 (tstamp=20130912172054)...
>
> Sleeping for 1 seconds...
> Getting device busy data for sdb 0 (tstamp=20130912172055)...
> Getting device busy data for sdc 62 (tstamp=20130912172055)...
> Getting device busy data for sde 0 (tstamp=20130912172055)...
Which give admin more hint about the situation.
Best regards,
Jack
[-- Attachment #2: 0001-export-device_busy-for-sdev.patch --]
[-- Type: text/x-patch, Size: 1262 bytes --]
>From cbca8a40fe3837789129e210365488d329d8a440 Mon Sep 17 00:00:00 2001
From: Jack Wang <jinpu.wang@profitbricks.com>
Date: Thu, 12 Sep 2013 16:57:16 +0200
Subject: [PATCH] export device_busy for sdev
If you mutiple devices connect to a host, we might be interested in
have an intensive I/O workload on one disk, and notice starvation on others.
This give the user more hint about current infight io for scsi device.
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
---
drivers/scsi/scsi_sysfs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 40c6394..a734710 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -529,6 +529,7 @@ static int scsi_sdev_check_buf_bit(const char *buf)
*/
sdev_rd_attr (device_blocked, "%d\n");
sdev_rd_attr (queue_depth, "%d\n");
+sdev_rd_attr (device_busy, "%d\n");
sdev_rd_attr (type, "%d\n");
sdev_rd_attr (scsi_level, "%d\n");
sdev_rd_attr (vendor, "%.8s\n");
@@ -750,6 +751,7 @@ static struct attribute *scsi_sdev_attrs[] = {
&dev_attr_device_blocked.attr,
&dev_attr_type.attr,
&dev_attr_scsi_level.attr,
+ &dev_attr_device_busy.attr,
&dev_attr_vendor.attr,
&dev_attr_model.attr,
&dev_attr_rev.attr,
--
1.8.4
reply other threads:[~2013-09-12 15:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=5231DDF0.6020104@profitbricks.com \
--to=jinpu.wang@profitbricks.com \
--cc=bvanassche@acm.org \
--cc=dongsu.park@profitbricks.com \
--cc=jbottomley@parallels.com \
--cc=linux-scsi@vger.kernel.org \
--cc=xjtuwjp@gmail.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;
as well as URLs for NNTP newsgroup(s).