Re: What does "ordering by draining" mean?

From: jidong xiao
Date: Thu Dec 27 2007 - 08:24:21 EST


On Dec 10, 2007 6:37 PM, Jens Axboe <jens.axboe@xxxxxxxxxx> wrote:
>
> On Mon, Dec 10 2007, jidong xiao wrote:
> > Hi,
> >
> > I am reading the source code of block I/O layer, and now seeing there
> > saying "ordering by draining" or "ordering by tag" in
> > include/blkdev.h,and the comments in that file says: "Hardbarrier is
> > supported with one of the following methods", but what do these two
> > methods exactly mean?
>
> ordering by draining means that you empty the pending queue of requests
> and then flush the cache to prevent a later issue of a new request to
> reach the platter before the older ones. order by tag means that the hw
> has a way of being told not to reorder beyond the barrier, in which case
> you don't have to drain the queue.
>

Well, I saw these comments in sd_revalidate_disk(), does this mean
SCSI TCQ is not supported in Linux?

1545 /*
1546 * We now have all cache related info, determine how we deal
1547 * with ordered requests. Note that as the current SCSI
1548 * dispatch function can alter request order, we cannot use
1549 * QUEUE_ORDERED_TAG_* even when ordered tag is supported.
1550 */
1551 if (sdkp->WCE)
1552 ordered = sdkp->DPOFUA
1553 ? QUEUE_ORDERED_DRAIN_FUA :
QUEUE_ORDERED_DRAIN_FLUSH;
1554 else
1555 ordered = QUEUE_ORDERED_DRAIN;
1556
1557 blk_queue_ordered(sdkp->disk->queue, ordered, sd_prepare_flush);

Regards
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/