public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Aaron Carroll <aaronc@gelato.unsw.edu.au>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cfq-iosched: fix queue depth detection
Date: Fri, 22 Aug 2008 11:06:21 +0200	[thread overview]
Message-ID: <20080822090620.GY20055@kernel.dk> (raw)
In-Reply-To: <48AE5FE2.2060003@gelato.unsw.edu.au>

On Fri, Aug 22 2008, Aaron Carroll wrote:
> Hi Jens,
> 
> This patch fixes a bug in the hw_tag detection logic causing a huge 
> performance
> hit under certain workloads on real queuing devices.  For example, an FIO 
> load
> of 16k direct random reads on an 8-disk hardware RAID yields about 2 MiB/s 
> on
> default CFQ, while noop achieves over 20 MiB/s.
> 
> While the solution is pretty ugly, it does have the advantage of adapting to
> queue depth changes.  Such a situation might occur if the queue depth is
> configured in userspace late in the boot process.

I don't think it's that ugly, and I prefer this logic to the existing
one in fact. Since it's a static property of the device, why did you
change it to toggle the flag back and forth instead of just setting it
once? Defaulting to tagging on is fine, otherwise we risk running into
the problem you describe where CFQ never attempts to queue > 1 request.
Then you'd want to see if the driver ever asks more requests while one
is in the driver, if it does it's definitely TCQ. If not, then it
doesn't do queueing. So the interesting window is the one where we have
more requests pending yet the driver doesn't ask for it. I'd prefer a
patch that took that more into account, instead of just looking at the
past 50 samples and then toggle the hw_tag flag depending on the
behaviour in that time frame. You could easily have a depth of 1 there
always if it's a sync workload, even if hardware can do tagged queuing.

-- 
Jens Axboe


  reply	other threads:[~2008-08-22  9:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-22  6:42 [PATCH] cfq-iosched: fix queue depth detection Aaron Carroll
2008-08-22  9:06 ` Jens Axboe [this message]
2008-08-22 11:02   ` Aaron Carroll
2008-08-22 11:23     ` Jens Axboe

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=20080822090620.GY20055@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=aaronc@gelato.unsw.edu.au \
    --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