[stgt] [PATCH 1/2] Add infrastructure for statistics on SCSI device level
Alexander Nezhinsky
nezhinsky at gmail.com
Fri Jul 6 10:41:44 CEST 2012
On Wed, Jul 4, 2012 at 5:31 PM, FUJITA Tomonori
<fujita.tomonori at lab.ntt.co.jp> wrote:
>> Thus a linked list's head called "it_nexus_lu_info_list" is added to both
>> struct scsi_lu and struct it_nexus, while struct it_nexus_lu_info
>
> Please use different names for each.
OK, no problem
>> @@ -201,6 +201,20 @@ int scsi_cmd_perform(int host_no, struct scsi_cmd *cmd)
>> unsigned char op = cmd->scb[0];
>> struct it_nexus_lu_info *itn_lu;
>>
>> + if (scsi_get_data_dir(cmd) == DATA_WRITE) {
>> + cmd->itn_lu_info->stat.wr_subm_sect += scsi_get_out_length(cmd) / 512;
>
> I'm not still not sure about this. How about the case that the sector
> size is not the multiple of 512? How about just using bytes?
I am re-working it to use bytes. The upside is correct counts for non-LBA cmds,
like most of the SPC stuff. The downside is of course a possible fast
flip to 0 under
very high loads, so that the sampling external app/script is more
likely to miss it.
Going to resend the patches shortly.
Alexander
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list