All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: dm-devel@redhat.com
Subject: Re: [PATCH] block: add missing block_bio_complete() tracepoint
Date: Mon, 30 Jan 2012 10:44:19 +0900	[thread overview]
Message-ID: <4F25F5F3.6060507@gmail.com> (raw)
In-Reply-To: <20120129192447.GB17211@htj.dyndns.org>

Hello,

2012-01-30 4:24 AM, Tejun Heo wrote:
> On Sun, Jan 29, 2012 at 06:41:33 PM +0900, 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.
>>
>>  From now on, request-based drivers will also get BLK_TA_COMPLETEs for
>> all bio's in requests. This needs to be handled in userland properly.
>>
>> Also remove external use of the TP in DM and unexport it.
>>
>> Signed-off-by: Namhyung Kim <namhyung@gmail.com>
>> Cc: Tejun Heo <tj@kernel.org>
>> Cc: Steven Rostedt <rostedt@goodmis.org>
>> Cc: dm-devel@redhat.com
>
> I like the smiplicity change but do we know how we can filter this out
> from userland?  Also, what's the reason not to do it from blktrace.c?
> What would be the downside of doing that?
>
> Thanks.
>

The userland tool cannot distinguish bounced bio from original one at 
completion TP, but it can expect there will be a duplicated 
BLK_TA_COMPLETE as it sees BLK_TA_BOUNCE for the bio before.

Filtering it out from kernel side seems to hide a real information that 
(paranoid?) user might want to get, and it looks like providing "polcy 
not mechanism" IMHO. That's why I changed my mind finally.

I cannot think of the downside, anyway it's not a big deal, if you think 
it's wrong choice, I'm OK to change it again.


Thanks,
Namhyung

  reply	other threads:[~2012-01-30  1:44 UTC|newest]

Thread overview: 18+ 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  9:41 ` Namhyung Kim
2012-01-29 19:24 ` Tejun Heo
2012-01-30  1:44   ` Namhyung Kim [this message]
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  6:38   ` Namhyung Kim
2012-01-30 17:05   ` Tejun Heo
2012-01-31  6:30     ` Namhyung Kim
2012-01-31 10:39       ` Tejun Heo
2012-02-01  2:18         ` Namhyung Kim

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=4F25F5F3.6060507@gmail.com \
    --to=namhyung@gmail.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.