public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Tejun Heo <htejun@gmail.com>,
	James.Bottomley@steeleye.com,
	Christoph Hellwig <hch@infradead.org>,
	linux-scsi@vger.kernel.org, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH scsi-misc-2.6 01/05] scsi: make blk layer set	REQ_SOFTBARRIER when a request is dispatched
Date: Wed, 20 Apr 2005 11:14:28 +0200	[thread overview]
Message-ID: <20050420091428.GH6558@suse.de> (raw)
In-Reply-To: <42661B2C.1020100@yahoo.com.au>

On Wed, Apr 20 2005, Nick Piggin wrote:
> >>Hmm, well, it seems that setting REQ_SOFTBARRIER on requeue path isn't
> >>necessary as we have INSERT_FRONT policy on requeue, and if
> >>elv_next_req_fn() is required to return the same request when the
> >>request isn't dequeued, you're right and we don't need this patch at
> >>all.  We are guaranteed that all requeued requests are served in LIFO
> >>manner.
> >
> >
> >After a requeue, it is not required to return the same request again.
> >
> 
> Well I guess not.
> 
> Would there be any benefit to reordering after a requeue?

Logic dictates that requeues should maintain ordering, since we don't
want to reorder around the original io scheduler decisions. But you
could be requeuing more than one request.

> >>BTW, the same un-dequeued request rule is sort of already broken as
> >>INSERT_FRONT request passes a returned but un-dequeued request, but,
> >>then again, we need this behavior as we have to favor fully-prepped
> >>requests over partially-prepped one.
> >
> >
> >INSERT_FRONT really should skip requests with REQ_STARTED on the
> >dispatch list to be fully safe.
> >
> 
> I guess this could be one use of 'reordering' after a requeue.

Yeah, or perhaps the io scheduler might determine that a request has
higher prio than a requeued one.  I'm not sure what semantics to place
on soft-barrier, I've always taken it to mean 'maintain ordering if
convenient' where the hard-barrier must be followed.

> I'm not sure this would need a REQ_SOFTBARRIER either though, really.
> 
> Your basic io scheduler framework - ie. a FIFO dispatch list which
> can have requests requeued on the front models pretty well what the
> block layer needs of the elevator.
> 
> Considering all requeues and all elv_next_request but not dequeued
> requests would have this REQ_SOFTBARRIER bit set, any other model
> that theoretically would allow reordering would degenerate to this
> dispatch list behaviour, right?

Not sure I follow this - I don't want REQ_SOFTBARRIER set automatically
on elv_next_request() return, it should only happen on requeues.
REQ_STARTED implies that you should not pass this request, since the io
scheduler is required to return this request again until dequeue is
called. But the result is the same, correct.

> In which case, the dispatch list is effectively basically the most
> efficient way to do it? In which case should we just explicitly
> document that in the API?

You lost me, please detail exactly what behaviour you want documented :)

-- 
Jens Axboe


  reply	other threads:[~2005-04-20  9:16 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-19 23:15 [PATCH scsi-misc-2.6 00/05] scsi: change REQ_SPECIAL/REQ_SOFTBARRIER usages Tejun Heo
2005-04-19 23:15 ` [PATCH scsi-misc-2.6 01/05] scsi: make blk layer set REQ_SOFTBARRIER when a request is dispatched Tejun Heo
2005-04-20  6:30   ` Jens Axboe
2005-04-20  6:44     ` Tejun Heo
2005-04-20  7:40     ` Tejun Heo
2005-04-20  7:58       ` Nick Piggin
2005-04-20  8:37         ` Tejun Heo
2005-04-20  8:38           ` Jens Axboe
2005-04-20  9:04             ` Nick Piggin
2005-04-20  9:14               ` Jens Axboe [this message]
2005-04-20  9:24                 ` Nick Piggin
2005-04-20  9:44                   ` Jens Axboe
2005-04-20 22:58                     ` Tejun Heo
2005-04-19 23:15 ` [PATCH scsi-misc-2.6 02/05] scsi: remove REQ_SPECIAL in scsi_init_io() Tejun Heo
2005-04-19 23:15 ` [PATCH scsi-misc-2.6 03/05] scsi: make scsi_queue_insert() use blk_requeue_request() Tejun Heo
2005-04-20 23:24   ` James Bottomley
2005-04-21  0:20     ` Tejun Heo
2005-04-21  2:16       ` James Bottomley
2005-04-21  2:29         ` Tejun Heo
2005-04-21  2:43         ` Tejun Heo
2005-04-21  6:10     ` Jens Axboe
2005-04-21 12:45       ` James Bottomley
2005-04-22 11:37         ` Jens Axboe
2005-04-19 23:15 ` [PATCH scsi-misc-2.6 04/05] scsi: make scsi_requeue_request() " Tejun Heo
2005-04-19 23:16 ` [PATCH scsi-misc-2.6 05/05] scsi: remove requeue feature from blk_insert_request() Tejun Heo

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=20050420091428.GH6558@suse.de \
    --to=axboe@suse.de \
    --cc=James.Bottomley@steeleye.com \
    --cc=hch@infradead.org \
    --cc=htejun@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    /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