linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@gmail.com>
To: undisclosed-recipients:;
Cc: linux-kernel@vger.kernel.org, Namhyung Kim <namhyung.kim@lge.com>,
	Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH 2/3] block: prevent duplicated bio completion report
Date: Thu, 19 Jan 2012 10:14:42 +0900	[thread overview]
Message-ID: <4F176E82.6030808@gmail.com> (raw)
In-Reply-To: <4F161E43.5040705@gmail.com>

Hello,

2012-01-18 10:20 AM, Namhyung Kim wrote:
> Hi,
> 
> 2012-01-18 2:45 AM, Tejun Heo wrote:
>>
>>> /*
>>> * top 4 bits of bio flags indicate the pool this bio came from
>>> */
>>> diff --git a/include/trace/events/block.h b/include/trace/events/block.h
>>> index 96955f4828b3..72888542e186 100644
>>> --- a/include/trace/events/block.h
>>> +++ b/include/trace/events/block.h
>>> @@ -219,7 +219,8 @@ TRACE_EVENT_CONDITION(block_bio_complete,
>>>
>>>  	TP_ARGS(q, bio, error),
>>>
>>> - TP_CONDITION(bio->bi_bdev != NULL),
>>> + TP_CONDITION(bio->bi_bdev != NULL &&
>>> + 		!(bio->bi_flags & BIO_COMPLETE_MASK)),
>>
>> Bounced bio's are separate bio's too and I don't think masking its
>> completion from the TP itself is a good idea. As I wrote before, why
>> not do this from blktrace code?
> 
> Because blktrace cannot know about the bi_flags, as I said before. :) 
> And although the bounced bio's are separate ones, they aren't queued 
> separately. They just get replaced on the way.

Oh, now I guess you meant this:

diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 16fc34a0806f..2ef57fb2566e 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -792,6 +792,9 @@ static void blk_add_trace_bio_complete(void *ignore,
                                       struct request_queue *q, struct bio *bio,
                                       int error)
 {
+       if (bio->bi_flags & BIO_COMPLETE_MASK)
+               return;
+
        blk_add_trace_bio(q, bio, BLK_TA_COMPLETE, error);
 }


Anyway do you still think masking on TP is not a good idea?


Thanks,
Namhyung

  reply	other threads:[~2012-01-19  1:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-17  1:32 [PATCH 1/3] block: add missing block_bio_complete() tracepoint Namhyung Kim
2012-01-17  1:32 ` [PATCH 2/3] block: prevent duplicated bio completion report Namhyung Kim
2012-01-17 17:45   ` Tejun Heo
2012-01-18  1:20     ` Namhyung Kim
2012-01-19  1:14       ` Namhyung Kim [this message]
2012-01-17  1:32 ` [PATCH 3/3] block: don't export block_bio_complete tracepoint 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=4F176E82.6030808@gmail.com \
    --to=namhyung@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung.kim@lge.com \
    /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;
as well as URLs for NNTP newsgroup(s).