[PATCH 0/2] scsi: ftrace based scsi tracing feature

From: Kei Tokunaga
Date: Wed Jan 20 2010 - 01:43:35 EST


Hi,

We'd like to propose this patchset (ftrace based scsi tracing)
as the first attempt for SCSI tracing, starting with the minimum
trace points.

Tracing gives us an idea how far SCSI processing goes, for
example, even in a case that a SCSI IRQ handling is blocked by
other drivers that disable interrupts for a long time. Also,
trace could be used for debugging purpose in development similar
to how USB developers use usbmon for collecting submitted and
completed URBs for debugging. In a mission critical area, there
is sometimes a case that we have to analyze a problem at customers
without taking a memory dump as much as possible. There is also
a case to solve a problem which reproducibility is very low (but
we can not just leave the problem) so collecting additional data
afterwards is difficult.

In this version, it prints host#, channel, id, lun, and CDB (and
a value of 'result' if it's called in scsi_done().) All fields
of CDB are printed in hex, and some of them are printed in ascii
as well. That makes the outputs be more user-friendly. For
example, retrieving 'lba' and 'transfer length (txlen)' data from
CDB of "SCSI3 block command READ/WRITE," and printing them in the
friendly format, users can easily correlate the info from SCSI
layer with block layer. (All the conversions to ascii that requires
relatively large costs are done in TP_printk(), making the overheads
at storing trace be minimum.)

CDB has various lengths for its size and that made us end up
creating __print_hex().

This patchset applies to 2.6.33-rc4.

([PATCH 0/2] scsi: ftrace based scsi tracing feature)
[PATCH 1/2] scsi: add __print_hex() to ftrace
[PATCH 2/2] scsi: add scsi trace core function and put trace points

Thanks,
Kei




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/