From: "Jörn Engel" <joern@logfs.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [RFC][PATCH] Add a flight data recorder for scsi commands
Date: Wed, 28 Aug 2013 10:19:38 -0400 [thread overview]
Message-ID: <20130828141937.GB15917@logfs.org> (raw)
In-Reply-To: <20130827203443.52cfee8c@gandalf.local.home>
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@logfs.org> 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2013-08-28 15:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130827220325.GB7293@logfs.org>
2013-08-27 22:17 ` [RFC][PATCH] Add a flight data recorder for scsi commands Jörn Engel
2013-08-28 5:09 ` Nicholas A. Bellinger
2013-08-28 14:28 ` Jörn Engel
2013-08-28 12:45 ` Bart Van Assche
2013-08-28 14:32 ` Jörn Engel
2013-08-27 23:54 ` Steven Rostedt
2013-08-27 22:41 ` Jörn Engel
2013-08-28 0:34 ` Steven Rostedt
2013-08-28 14:19 ` Jörn Engel [this message]
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=20130828141937.GB15917@logfs.org \
--to=joern@logfs.org \
--cc=linux-scsi@vger.kernel.org \
--cc=rostedt@goodmis.org \
/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