Latency Bubbles follow up

Following on from the latency bubbles in your IO posting. I have been asked two questions about this post privately:

  1. How can you map those long numbers in the output into readable entries, eg sd0.
  2. How can I confirm that disksort has been turned off?

The first one just requires another glob of D:

#
#pragma D option quiet
#define SD_TO_DEVINFO(un) ((struct dev_info *)((un)->un_sd->sd_dev))
#define DEV_NAME(un)
       stringof(`devnamesp[SD_TO_DEVINFO(un)->devi_major].dn_name) /* ` */
#define DEV_INST(un) (SD_TO_DEVINFO(un)->devi_instance)
fbt:ssd:ssdstrategy:entry, fbt:sd:sdstrategy:entry
{
        bstart[(struct buf *)arg0] = timestamp;
}  fbt:ssd:ssdintr:entry, fbt:sd:sdintr:entry
/ arg0 != 0 / {
        this->buf = (struct buf *)((struct scsi_pkt *)arg0)->pkt_private;
}
fbt:ssd:ssdintr:entry, fbt:sd:sdintr:entry
/ this->buf /
{
          this->priv = (struct sd_xbuf *) this->buf->b_private;
}
fbt:ssd:ssdintr:entry, fbt:sd:sdintr:entry
/ this->priv /
{
             this->un = this->priv->xb_un;
}
fbt:ssd:ssdintr:entry, fbt:sd:sdintr:entry
/ this->buf && bstart[this->buf] && this->un /
{
         @l[DEV_NAME(this->un), DEV_INST(this->un)] =
                 lquantize((timestamp - bstart[this->buf])/1000000, 0,
                 60000, 60000);
         @q[DEV_NAME(this->un), DEV_INST(this->un)] =
                 quantize((timestamp - bstart[this->buf])/1000000);
                 bstart[this->buf] = 0;
}

The second required a little bit of mdb. Yes you can also get the same from dtrace mdb gives the the immediate answer, firstly for all the disks that use the sd driver and then for instance 1:

 # echo '*sd_state::walk softstate | ::print -at "struct sd_lun" un_f_disksort_disabled' | mdb -k
300000ad46b unsigned un_f_disksort_disabled = 0
60000e23f2b unsigned un_f_disksort_disabled = 0
# echo '*sd_state::softstate 1 | ::print -at "struct sd_lun" un_f_disksort_disabled' | mdb -k
300000ad46b unsigned un_f_disksort_disabled = 0

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

WP Like Button Plugin by Free WordPress Templates