From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Mathieu Desnoyers <compudj@krystal.dyndns.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][v2] blktrace: conversion to tracepoints
Date: Wed, 29 Oct 2008 13:50:56 -0200 [thread overview]
Message-ID: <20081029155056.GE28123@ghostprotocols.net> (raw)
In-Reply-To: <20081029131855.GC31673@kernel.dk>
Em Wed, Oct 29, 2008 at 02:18:55PM +0100, Jens Axboe escreveu:
> On Wed, Oct 29 2008, Arnaldo Carvalho de Melo wrote:
> > Hi Jens,
> >
> > Now that the tracepoints infrastructure is merged I updated the
> > patch, please take a look.
> >
> > One suggestion I got was to have things like:
> >
> > trace_block_unplug_io(q, q->rq.count[READ] + q->rq.count[WRITE]);
> >
> > That was:
> >
> > blk_add_trace_pdu_int(q, BLK_TA_UNPLUG_IO, NULL,
> > q->rq.count[READ] + q->rq.count[WRITE]);
> >
> > To be:
> >
> > trace_block_unplug_io(q, q->rq.count[READ], q->rq.count[WRITE]);
> >
> > Or even:
> >
> > trace_block_unplug_io(q);
> >
> > And on blk_add_trace_unplug_io tracepoint do the math and feed
> > it to __blk_add_trace.
> >
> > So that the information on the number of types of requests
> > instead of the sum, what do you think? Overengineering? For blktrace it
> > would end up being preserved as is in, say:
> >
> > static void blk_add_trace_unplug_io(struct request_queue *q,
> > unsigned int rd, unsigned int wr)
> > {
> > struct blk_trace *bt = q->blk_trace;
> >
> > if (bt) {
> > __be64 rpdu = cpu_to_be64(rd + wr);
> >
> > __blk_add_trace(bt, 0, 0, 0, BLK_TA_UNPLUG_IO, 0,
> > sizeof(rpdu), &rpdu);
> > }
> > }
> >
> > Perhaps doing it as 'trace_block_unplug_io(q)' would be the best
> > scenario, as the tracepoint user can look at struct_request queue at
> > will anyway and the code gets cleaner :-)
> >
> > Feel free to point any disgusting aspect, perhaps there is at
> > least one to warn me about fixing 8-)
>
> You my as well pass the members separately now that it's a specific call
> anyway, to avoid doing the calculation when tracing is disabled.
>
> Patch looks straight forward. Perhaps it would be cleaner to use an
> atomic type for the reference?
I'll do that now and repost, thanks,
- Arnaldo
next prev parent reply other threads:[~2008-10-29 15:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 12:05 [PATCH][v2] blktrace: conversion to tracepoints Arnaldo Carvalho de Melo
2008-10-29 13:18 ` Jens Axboe
2008-10-29 15:50 ` Arnaldo Carvalho de Melo [this message]
2008-10-29 19:43 ` [PATCH][v3] " Arnaldo Carvalho de Melo
2008-10-30 7:31 ` Jens Axboe
2008-10-30 11:03 ` Arnaldo Carvalho de Melo
2008-10-30 11:11 ` Jens Axboe
2008-11-03 17:21 ` Arnaldo Carvalho de Melo
2008-11-03 17:22 ` Jens Axboe
2008-11-03 18:08 ` Arnaldo Carvalho de Melo
2008-11-07 14:29 ` Alan D. Brunelle
2008-11-07 14:32 ` Jens Axboe
2008-11-07 15:38 ` Arnaldo Carvalho de Melo
2008-10-30 14:44 ` [PATCH][v3] blktrace: conversion to tracepoints 2.6.27.4 backport Mathieu Desnoyers
2008-10-30 14:47 ` Arnaldo Carvalho de Melo
2008-10-29 15:17 ` [PATCH][v2] blktrace: conversion to tracepoints Mathieu Desnoyers
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=20081029155056.GE28123@ghostprotocols.net \
--to=acme@redhat.com \
--cc=compudj@krystal.dyndns.org \
--cc=jens.axboe@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox