* BLK_TA_ISSUE
@ 2007-04-12 1:32 Ming Zhang
2007-04-12 11:29 ` BLK_TA_ISSUE Jens Axboe
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Ming Zhang @ 2007-04-12 1:32 UTC (permalink / raw)
To: linux-btrace
Hi All
For this ISSUE event, currently it is in elv_next_request(), any idea
why it is not in elv_dequeue_request() which is where the request marked
as on-the-fly and send to lower level?
Thanks,
Ming
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: BLK_TA_ISSUE
2007-04-12 1:32 BLK_TA_ISSUE Ming Zhang
@ 2007-04-12 11:29 ` Jens Axboe
2007-04-12 13:18 ` BLK_TA_ISSUE Ming Zhang
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2007-04-12 11:29 UTC (permalink / raw)
To: linux-btrace
On Wed, Apr 11 2007, Ming Zhang wrote:
> Hi All
>
> For this ISSUE event, currently it is in elv_next_request(), any idea
> why it is not in elv_dequeue_request() which is where the request marked
> as on-the-fly and send to lower level?
elv_next_request() is the driver hand-off point, so should be pretty
close to the issue time unless the request gets requeued due to some
busy condition (which will also be logged). elv_dequeue_request() may
happen much later, some drivers do it right before calling the io
completion handler - IDE does this - since it leaves the request on the
queue list for the duration of the operation. So moving the ISSUE event
to elv_dequeue_request() would not be correct.
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: BLK_TA_ISSUE
2007-04-12 1:32 BLK_TA_ISSUE Ming Zhang
2007-04-12 11:29 ` BLK_TA_ISSUE Jens Axboe
@ 2007-04-12 13:18 ` Ming Zhang
2007-04-12 21:16 ` BLK_TA_ISSUE Jens Axboe
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Ming Zhang @ 2007-04-12 13:18 UTC (permalink / raw)
To: linux-btrace
On Thu, 2007-04-12 at 13:29 +0200, Jens Axboe wrote:
> On Wed, Apr 11 2007, Ming Zhang wrote:
> > Hi All
> >
> > For this ISSUE event, currently it is in elv_next_request(), any idea
> > why it is not in elv_dequeue_request() which is where the request marked
> > as on-the-fly and send to lower level?
>
> elv_next_request() is the driver hand-off point, so should be pretty
> close to the issue time unless the request gets requeued due to some
> busy condition (which will also be logged). elv_dequeue_request() may
> happen much later, some drivers do it right before calling the io
> completion handler - IDE does this - since it leaves the request on the
> queue list for the duration of the operation. So moving the ISSUE event
> to elv_dequeue_request() would not be correct.
>
ic. i assumed all requests will be removed from queue before llDD handle
it.
in 2.6.20 ele_dequeue_request
771
772 /*
773 * the time frame between a request being removed from the lists
774 * and to it is freed is accounted as io that is in progress at
775 * the driver side.
776 */
777 if (blk_account_rq(rq))
778 q->in_flight++;
then this in_flight counter is more likely to be how many outstanding
requests that not in the queue and before it is free. and it might be
less than how many undergoing IOs?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: BLK_TA_ISSUE
2007-04-12 1:32 BLK_TA_ISSUE Ming Zhang
2007-04-12 11:29 ` BLK_TA_ISSUE Jens Axboe
2007-04-12 13:18 ` BLK_TA_ISSUE Ming Zhang
@ 2007-04-12 21:16 ` Jens Axboe
2007-04-12 21:22 ` BLK_TA_ISSUE Ming Zhang
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2007-04-12 21:16 UTC (permalink / raw)
To: linux-btrace
On Thu, Apr 12 2007, Ming Zhang wrote:
> On Thu, 2007-04-12 at 13:29 +0200, Jens Axboe wrote:
> > On Wed, Apr 11 2007, Ming Zhang wrote:
> > > Hi All
> > >
> > > For this ISSUE event, currently it is in elv_next_request(), any idea
> > > why it is not in elv_dequeue_request() which is where the request marked
> > > as on-the-fly and send to lower level?
> >
> > elv_next_request() is the driver hand-off point, so should be pretty
> > close to the issue time unless the request gets requeued due to some
> > busy condition (which will also be logged). elv_dequeue_request() may
> > happen much later, some drivers do it right before calling the io
> > completion handler - IDE does this - since it leaves the request on the
> > queue list for the duration of the operation. So moving the ISSUE event
> > to elv_dequeue_request() would not be correct.
> >
>
> ic. i assumed all requests will be removed from queue before llDD handle
> it.
>
> in 2.6.20 ele_dequeue_request
>
> 771
> 772 /*
> 773 * the time frame between a request being removed from the lists
> 774 * and to it is freed is accounted as io that is in progress at
> 775 * the driver side.
> 776 */
> 777 if (blk_account_rq(rq))
> 778 q->in_flight++;
>
> then this in_flight counter is more likely to be how many outstanding
> requests that not in the queue and before it is free. and it might be
> less than how many undergoing IOs?
It's good enough for what ->in_flight is used for. Your assumption on
that all low level drivers dequeue before handling a request is wrong.
Usually only drivers that do queueing do this.
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: BLK_TA_ISSUE
2007-04-12 1:32 BLK_TA_ISSUE Ming Zhang
` (2 preceding siblings ...)
2007-04-12 21:16 ` BLK_TA_ISSUE Jens Axboe
@ 2007-04-12 21:22 ` Ming Zhang
2007-04-13 5:30 ` BLK_TA_ISSUE Jens Axboe
2007-04-13 13:18 ` BLK_TA_ISSUE Ming Zhang
5 siblings, 0 replies; 7+ messages in thread
From: Ming Zhang @ 2007-04-12 21:22 UTC (permalink / raw)
To: linux-btrace
On Thu, 2007-04-12 at 23:16 +0200, Jens Axboe wrote:
> On Thu, Apr 12 2007, Ming Zhang wrote:
> > On Thu, 2007-04-12 at 13:29 +0200, Jens Axboe wrote:
> > > On Wed, Apr 11 2007, Ming Zhang wrote:
> > > > Hi All
> > > >
> > > > For this ISSUE event, currently it is in elv_next_request(), any idea
> > > > why it is not in elv_dequeue_request() which is where the request marked
> > > > as on-the-fly and send to lower level?
> > >
> > > elv_next_request() is the driver hand-off point, so should be pretty
> > > close to the issue time unless the request gets requeued due to some
> > > busy condition (which will also be logged). elv_dequeue_request() may
> > > happen much later, some drivers do it right before calling the io
> > > completion handler - IDE does this - since it leaves the request on the
> > > queue list for the duration of the operation. So moving the ISSUE event
> > > to elv_dequeue_request() would not be correct.
> > >
> >
> > ic. i assumed all requests will be removed from queue before llDD handle
> > it.
> >
> > in 2.6.20 ele_dequeue_request
> >
> > 771
> > 772 /*
> > 773 * the time frame between a request being removed from the lists
> > 774 * and to it is freed is accounted as io that is in progress at
> > 775 * the driver side.
> > 776 */
> > 777 if (blk_account_rq(rq))
> > 778 q->in_flight++;
> >
> > then this in_flight counter is more likely to be how many outstanding
> > requests that not in the queue and before it is free. and it might be
> > less than how many undergoing IOs?
>
> It's good enough for what ->in_flight is used for. Your assumption on
> that all low level drivers dequeue before handling a request is wrong.
> Usually only drivers that do queueing do this.
so u meant most driver will leave request in queue unless they do
internal queuing?
does this mean the queue can be unnecessary long and travel the list
will go through some requests that under io already?
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: BLK_TA_ISSUE
2007-04-12 1:32 BLK_TA_ISSUE Ming Zhang
` (3 preceding siblings ...)
2007-04-12 21:22 ` BLK_TA_ISSUE Ming Zhang
@ 2007-04-13 5:30 ` Jens Axboe
2007-04-13 13:18 ` BLK_TA_ISSUE Ming Zhang
5 siblings, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2007-04-13 5:30 UTC (permalink / raw)
To: linux-btrace
On Thu, Apr 12 2007, Ming Zhang wrote:
> On Thu, 2007-04-12 at 23:16 +0200, Jens Axboe wrote:
> > On Thu, Apr 12 2007, Ming Zhang wrote:
> > > On Thu, 2007-04-12 at 13:29 +0200, Jens Axboe wrote:
> > > > On Wed, Apr 11 2007, Ming Zhang wrote:
> > > > > Hi All
> > > > >
> > > > > For this ISSUE event, currently it is in elv_next_request(), any idea
> > > > > why it is not in elv_dequeue_request() which is where the request marked
> > > > > as on-the-fly and send to lower level?
> > > >
> > > > elv_next_request() is the driver hand-off point, so should be pretty
> > > > close to the issue time unless the request gets requeued due to some
> > > > busy condition (which will also be logged). elv_dequeue_request() may
> > > > happen much later, some drivers do it right before calling the io
> > > > completion handler - IDE does this - since it leaves the request on the
> > > > queue list for the duration of the operation. So moving the ISSUE event
> > > > to elv_dequeue_request() would not be correct.
> > > >
> > >
> > > ic. i assumed all requests will be removed from queue before llDD handle
> > > it.
> > >
> > > in 2.6.20 ele_dequeue_request
> > >
> > > 771
> > > 772 /*
> > > 773 * the time frame between a request being removed from the lists
> > > 774 * and to it is freed is accounted as io that is in progress at
> > > 775 * the driver side.
> > > 776 */
> > > 777 if (blk_account_rq(rq))
> > > 778 q->in_flight++;
> > >
> > > then this in_flight counter is more likely to be how many outstanding
> > > requests that not in the queue and before it is free. and it might be
> > > less than how many undergoing IOs?
> >
> > It's good enough for what ->in_flight is used for. Your assumption on
> > that all low level drivers dequeue before handling a request is wrong.
> > Usually only drivers that do queueing do this.
>
> so u meant most driver will leave request in queue unless they do
> internal queuing?
Not internal queuing, queuing at the device level. No drivers should do
internal queuing, they should always push requests back if they cannot
handle them.
> does this mean the queue can be unnecessary long and travel the list
> will go through some requests that under io already?
Typically no, because such devices will only have 1 request active at
the time.
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: BLK_TA_ISSUE
2007-04-12 1:32 BLK_TA_ISSUE Ming Zhang
` (4 preceding siblings ...)
2007-04-13 5:30 ` BLK_TA_ISSUE Jens Axboe
@ 2007-04-13 13:18 ` Ming Zhang
5 siblings, 0 replies; 7+ messages in thread
From: Ming Zhang @ 2007-04-13 13:18 UTC (permalink / raw)
To: linux-btrace
On Fri, 2007-04-13 at 07:30 +0200, Jens Axboe wrote:
> On Thu, Apr 12 2007, Ming Zhang wrote:
> > On Thu, 2007-04-12 at 23:16 +0200, Jens Axboe wrote:
> > > On Thu, Apr 12 2007, Ming Zhang wrote:
> > > > On Thu, 2007-04-12 at 13:29 +0200, Jens Axboe wrote:
> > > > > On Wed, Apr 11 2007, Ming Zhang wrote:
> > > > > > Hi All
> > > > > >
> > > > > > For this ISSUE event, currently it is in elv_next_request(), any idea
> > > > > > why it is not in elv_dequeue_request() which is where the request marked
> > > > > > as on-the-fly and send to lower level?
> > > > >
> > > > > elv_next_request() is the driver hand-off point, so should be pretty
> > > > > close to the issue time unless the request gets requeued due to some
> > > > > busy condition (which will also be logged). elv_dequeue_request() may
> > > > > happen much later, some drivers do it right before calling the io
> > > > > completion handler - IDE does this - since it leaves the request on the
> > > > > queue list for the duration of the operation. So moving the ISSUE event
> > > > > to elv_dequeue_request() would not be correct.
> > > > >
> > > >
> > > > ic. i assumed all requests will be removed from queue before llDD handle
> > > > it.
> > > >
> > > > in 2.6.20 ele_dequeue_request
> > > >
> > > > 771
> > > > 772 /*
> > > > 773 * the time frame between a request being removed from the lists
> > > > 774 * and to it is freed is accounted as io that is in progress at
> > > > 775 * the driver side.
> > > > 776 */
> > > > 777 if (blk_account_rq(rq))
> > > > 778 q->in_flight++;
> > > >
> > > > then this in_flight counter is more likely to be how many outstanding
> > > > requests that not in the queue and before it is free. and it might be
> > > > less than how many undergoing IOs?
> > >
> > > It's good enough for what ->in_flight is used for. Your assumption on
> > > that all low level drivers dequeue before handling a request is wrong.
> > > Usually only drivers that do queueing do this.
> >
> > so u meant most driver will leave request in queue unless they do
> > internal queuing?
>
> Not internal queuing, queuing at the device level. No drivers should do
> internal queuing, they should always push requests back if they cannot
> handle them.
>
> > does this mean the queue can be unnecessary long and travel the list
> > will go through some requests that under io already?
>
> Typically no, because such devices will only have 1 request active at
> the time.
>
ic. thanks for explanation on both.
Ming
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-04-13 13:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-12 1:32 BLK_TA_ISSUE Ming Zhang
2007-04-12 11:29 ` BLK_TA_ISSUE Jens Axboe
2007-04-12 13:18 ` BLK_TA_ISSUE Ming Zhang
2007-04-12 21:16 ` BLK_TA_ISSUE Jens Axboe
2007-04-12 21:22 ` BLK_TA_ISSUE Ming Zhang
2007-04-13 5:30 ` BLK_TA_ISSUE Jens Axboe
2007-04-13 13:18 ` BLK_TA_ISSUE Ming Zhang
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.