linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* What does "ordering by draining" mean?
@ 2007-12-10  9:49 jidong xiao
  2007-12-10 10:37 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: jidong xiao @ 2007-12-10  9:49 UTC (permalink / raw)
  To: linux-kernel

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?

Thanks

Regards
Jason

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: What does "ordering by draining" mean?
  2007-12-10  9:49 What does "ordering by draining" mean? jidong xiao
@ 2007-12-10 10:37 ` Jens Axboe
  2007-12-27 13:23   ` jidong xiao
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Axboe @ 2007-12-10 10:37 UTC (permalink / raw)
  To: jidong xiao; +Cc: linux-kernel

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.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: What does "ordering by draining" mean?
  2007-12-10 10:37 ` Jens Axboe
@ 2007-12-27 13:23   ` jidong xiao
  0 siblings, 0 replies; 3+ messages in thread
From: jidong xiao @ 2007-12-27 13:23 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

On Dec 10, 2007 6:37 PM, Jens Axboe <jens.axboe@oracle.com> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-12-27 13:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-10  9:49 What does "ordering by draining" mean? jidong xiao
2007-12-10 10:37 ` Jens Axboe
2007-12-27 13:23   ` jidong xiao

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).