Re: [RFC][PATCH] Add a flight data recorder for scsi commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 27 August 2013 20:34:43 -0400, Steven Rostedt wrote:
> On Tue, 27 Aug 2013 18:41:47 -0400
> Jörn Engel <joern@xxxxxxxxx> wrote:
> > 
> > "without knowing in advance which device it will be"
> > 
> > I have to trace all devices, because I don't know the interesting one
> > ahead of time.  And after the fact, I only care about one device.  So
> > having per-device trace buffers seems to be The Right Approach(tm).
> > 
> > And having multiple trace buffers is where I cannot easily make my
> > problem fit your infrastructure.  
> 
> Are you sure about that?

When it comes to my mental shortcomings, I am quite sure about their
existence. ;)

> Note, I'm not sure you want this as something
> in production systems to always have on boot, for that, we can modify
> things a little to help you there. But other than that you can do:
> 
> for each device d
>   mkdir /sys/kernel/debug/tracing/instances/scsi-$d
>   cd /sys/kernel/debug/tracing/instances/scsi-$d
>   echo $filter > events/scsi/*/filter
>   echo 1 > events/scsi/*/enable
> done
> 
> The above is a script like pseudo code, just to convey the idea, not
> something to put in verbatim.

That does look fairly neat and doable.  I am not sure about the
performance overhead, though.  Would this translate into one big
switch or, for large systems, hundreds of "if (some_filter)" lines.
The latter would likely be noticeable overhead.

> Now, this may still not be what you want, but at a minimum, I would not
> add another hook like you did with the fdr_scsi_cmd(cmd). You know you
> can hook to the tracepoint directly.
> 
> 
> 	register_trace_scsi_dispatch_cmd_start(fdr_scsi_cmd, NULL);
> 
> static void fdr_scsi_cmd(void *data, struct scsi_cmnd *cmd)
> {
> 	[...]
> }
> 
> Once you call that register function, the tracepoint will call the
> function you registered when the tracepoint is hit.

Hmm.  I will ponder that idea for a bit.  If we can come up with
something merge-worthy, that would be great.  If not, I will simply
carry my existing patch and not make anyone else pay the cost for it.

Jörn

--
The wise man seeks everything in himself; the ignorant man tries to get
everything from somebody else.
-- unknown
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux