From: Namhyung Kim <email@example.com>
To: Tejun Heo <firstname.lastname@example.org>
Cc: Jens Axboe <email@example.com>,
Steven Rostedt <firstname.lastname@example.org>,
Subject: Re: [PATCH] block: add missing block_bio_complete() tracepoint
Date: Tue, 31 Jan 2012 15:30:16 +0900 [thread overview]
Message-ID: <4F278A78.email@example.com> (raw)
2012-01-31 2:05 AM, Tejun Heo wrote:
> On Mon, Jan 30, 2012 at 03:38:57PM +0900, Namhyung Kim wrote:
>> 2012-01-29 6:41 PM, Namhyung Kim wrote:
>>> The block_bio_complete() TP has been missed so long, so that bio-based
>>> drivers haven't been able to trace its IO behavior. Add it.
>>> In some rare cases, such as loop_switch, @bio->bi_bdev can be NULL.
>>> Thus convert it to TRACE_EVENT_CONDITION() as Steven suggested.
>> Now I see that it seems TRACE_EVENT_CONDITION() can protect event
>> tracing from such condition, but what about other users of the TP
>> like blktrace? I think it'll still get NULL pointer dereference on
>> bdev_get_queue() after the change, right? If so, convert to T_E_C()
>> looks meaningless IMHO. Do I miss something?
> Not really following, but the whole point of using
> TRACE_EVENT_CONDITION() is avoiding the conditional jump when the TP
> is disabled. Whether the TP users need to test again / more isn't too
Right, but the point is it could make a NULL pointer dereference during
evaluation of the argument of the TP AFAICS. I'm not sure about the TP
implementation though, I think I was wrong - T_E_C() cannot protect us
from it because it happens just before jumping to the TP, right?
So I think we need a conditional jump (with the "likely" annotation) for
this even when the TP is disabled.
next prev parent reply other threads:[~2012-01-31 6:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-29 9:41 [PATCH] block: add missing block_bio_complete() tracepoint Namhyung Kim
2012-01-29 19:24 ` Tejun Heo
2012-01-30 1:44 ` Namhyung Kim
2012-01-30 1:47 ` Tejun Heo
2012-01-30 2:22 ` Namhyung Kim
2012-01-30 2:30 ` Tejun Heo
2012-01-30 2:49 ` Namhyung Kim
2012-01-30 2:53 ` Tejun Heo
2012-01-30 5:51 ` Namhyung Kim
2012-01-30 5:54 ` Tejun Heo
2012-01-30 6:02 ` Namhyung Kim
2012-01-30 6:38 ` Namhyung Kim
2012-01-30 17:05 ` Tejun Heo
2012-01-31 6:30 ` Namhyung Kim [this message]
2012-01-31 10:39 ` Tejun Heo
2012-02-01 2:18 ` Namhyung Kim
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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;
as well as URLs for NNTP newsgroup(s).