From: Christof Schmitt <christof.schmitt@de.ibm.com>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: linux-scsi@vger.kernel.org, linux-btrace@vger.kernel.org
Subject: Re: [RFC] blktrace interface for sg devices
Date: Thu, 13 Dec 2007 17:23:32 +0100 [thread overview]
Message-ID: <20071213162332.GA16902@schmichrtp.de.ibm.com> (raw)
In-Reply-To: <20071213091942.GB10113@kernel.dk>
On Thu, Dec 13, 2007 at 10:19:42AM +0100, Jens Axboe wrote:
[...]
> I think this approach is the simplest and right way to do it. Tracing is
> really just tied to the "transport" (transport here meaning how we
> transport commands to the device), and even character scsi devices use
> the block layer queue for this operation, as you note.
>
> Let me know when you are happy with the patch, and I'll queue it up for
> 2.6.25.
> > @@ -1066,6 +1068,16 @@ sg_ioctl(struct inode *inode, struct fil
> > case BLKSECTGET:
> > return put_user(sdp->device->request_queue->max_sectors * 512,
> > ip);
> > + case BLKTRACESETUP:
> > + {
> > + return blk_trace_setup(sdp->device->request_queue , sdp->device->sdev_gendev.bus_id, &sdp->device->sdev_gendev, arg);
> > + }
>
> Don't need those braces, some other space and long line style issues as
> well.
>
> > --- a/include/linux/blkdev.h 2007-12-13 08:48:23.000000000 +0100
> > +++ b/include/linux/blkdev.h 2007-12-13 08:48:25.000000000 +0100
> > @@ -747,6 +747,16 @@ static inline void blkdev_dequeue_reques
> > elv_dequeue_request(req->q, req);
> > }
> >
> > +#ifdef CONFIG_BLK_DEV_IO_TRACE
> > +extern int blk_trace_setup(request_queue_t *q, char * name, dev_t dev, char __user *arg);
> > +extern int blk_trace_startstop(request_queue_t *q, int start);
> > +extern int blk_trace_remove(request_queue_t *q);
> > +#else
> > +#define blk_trace_setup(q, name, dev, arg) do { } while(0)
> > +#define blk_trace_startstop(q, start) do { } while(0)
> > +#define blk_trace_remove(q) do { } while(0)
> > +#endif
> > +
>
> Put these in the blktrace include file.
Thanks for your input. I will prepare and send an updated version of
the patch. I also want to do some more testing, especially to see how
i can get the sizes of read and write requests and latencies for SCSI
tape drives.
Christof Schmitt
next prev parent reply other threads:[~2007-12-13 16:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-13 9:09 [RFC] blktrace interface for sg devices Christof Schmitt
2007-12-13 9:19 ` Jens Axboe
2007-12-13 16:23 ` Christof Schmitt [this message]
2007-12-18 9:06 ` [PATCH] blktrace: Add blktrace ioctls to SCSI generic devices Christof Schmitt
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=20071213162332.GA16902@schmichrtp.de.ibm.com \
--to=christof.schmitt@de.ibm.com \
--cc=jens.axboe@oracle.com \
--cc=linux-btrace@vger.kernel.org \
--cc=linux-scsi@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