mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Jens Axboe <axboe@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH linux-2.6-block:master 02/05] blk: update ioscheds to use generic dispatch queue
Date: Thu, 20 Oct 2005 22:51:24 +0900	[thread overview]
Message-ID: <20051020135124.GB26004@htj.dyndns.org> (raw)
In-Reply-To: <20051020112109.GC2811@suse.de>

On Thu, Oct 20, 2005 at 01:21:09PM +0200, Jens Axboe wrote:
> On Wed, Oct 19 2005, Tejun Heo wrote:
> > 02_blk_generic-dispatch-queue-update-for-ioscheds.patch
> > 
> > 	This patch updates all four ioscheds to use generic dispatch
> > 	queue.  There's one behavior change in as-iosched.
> > 
> > 	* In as-iosched, when force dispatching
> > 	  (ELEVATOR_INSERT_BACK), batch_data_dir is reset to REQ_SYNC
> > 	  and changed_batch and new_batch are cleared to zero.  This
> > 	  prevernts AS from doing incorrect update_write_batch after
> > 	  the forced dispatched requests are finished.
> > 
> > 	* In cfq-iosched, cfqd->rq_in_driver currently counts the
> > 	  number of activated (removed) requests to determine
> > 	  whether queue-kicking is needed and cfq_max_depth has been
> > 	  reached.  With generic dispatch queue, I think counting
> > 	  the number of dispatched requests would be more appropriate.
> > 
> > 	* cfq_max_depth can be lowered to 1 again.
> 
> I applied this one as well, with some minor changes. The biggest one is
> a cleanup of the 'force' logic, it seems to be a little mixed up in this
> patch. You use it for forcing dispatch, which is fine. But then it also
> doubles as whether you want to sort insert on the generic queue or just
> add to the tail?

 When forced dispatch occurs, all requests in a elevator get dumped
into the dispatch queue.  Specific elevators are free to dump in any
order and it's likely that specific elevators don't dump in the
optimal order - e.g. for cfq, it will dump each cfqq's in order which
results in unnecessary seeks.  That's why all the current ioscheds
tells elv_dispatch_insert() to perform global dispatch queue sorting
when they dump requests due to force argument.  Maybe add comments to
explain this?

>   
> > -		if (cfq_class_idle(cfqq))
> > -			max_dispatch = 1;
> > +		if (force)
> > +			max_dispatch = INT_MAX;
> > +		else
> > +			max_dispatch =
> > +				cfq_class_idle(cfqq) ? 1 : cfqd->cfq_quantum;
> 
> Also, please don't use these ?: constructs, I absolutely hate them as
> they are weird to read.

 Hehheh, I actually like "?:"s, but I'll stay away from it.

 Thanks.

-- 
tejun

  reply	other threads:[~2005-10-20 13:51 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-19 12:35 [PATCH linux-2.6-block:master 00/05] blk: " Tejun Heo
2005-10-19 12:35 ` [PATCH linux-2.6-block:master 01/05] blk: implement " Tejun Heo
2005-10-20 10:00   ` Jens Axboe
2005-10-20 13:45     ` Tejun Heo
2005-10-20 14:04       ` Jens Axboe
2005-10-20 14:19         ` Tejun Heo
2005-10-19 12:35 ` [PATCH linux-2.6-block:master 02/05] blk: update ioscheds to use " Tejun Heo
2005-10-20 11:21   ` Jens Axboe
2005-10-20 13:51     ` Tejun Heo [this message]
2005-10-20 14:11       ` Jens Axboe
2005-10-20 14:35         ` Tejun Heo
2005-10-20 14:41           ` Jens Axboe
2005-10-20 15:00             ` Tejun Heo
2005-10-20 17:07               ` Jens Axboe
2005-10-20 17:31                 ` Tejun Heo
2005-11-17 13:34               ` [PATCH linux-2.6-14-mm2] block: problem unloading I/O-Scheduler Module Dirk Henning Gerdes
2005-11-17 13:46                 ` Jens Axboe
2005-10-19 12:35 ` [PATCH linux-2.6-block:master 03/05] blk: move last_merge handling into generic elevator code Tejun Heo
2005-10-20 11:26   ` Jens Axboe
2005-10-19 12:35 ` [PATCH linux-2.6-block:master 04/05] blk: remove last_merge handling from ioscheds Tejun Heo
2005-10-20 11:26   ` Jens Axboe
2005-10-19 12:35 ` [PATCH linux-2.6-block:master 05/05] blk: update biodoc Tejun Heo
2005-10-20 11:27   ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2005-07-26 13:56 [PATCH linux-2.6-block:master 00/05] blk: generic dispatch queue Tejun Heo
2005-07-26 13:56 ` [PATCH linux-2.6-block:master 02/05] blk: update ioscheds to use " 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=20051020135124.GB26004@htj.dyndns.org \
    --to=htejun@gmail.com \
    --cc=axboe@suse.de \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®