All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Lord <kernel@teksavvy.com>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: "Benjamin S." <sbenni@gmx.de>,
	Robert Hancock <hancockrwd@gmail.com>,
	Jeff Garzik <jgarzik@pobox.com>,
	linux-ide@vger.kernel.org
Subject: Re: bad performance with SSD since kernel version 2.6.32
Date: Mon, 22 Feb 2010 16:49:40 -0500	[thread overview]
Message-ID: <4B82FBF4.10702@teksavvy.com> (raw)
In-Reply-To: <20100222190522.GD1025@kernel.dk>

On 02/22/10 14:05, Jens Axboe wrote:

--- a/block/blk-core.c
+++ b/block/blk-core.c
...
@@ -1857,8 +1857,15 @@ void blk_dequeue_request(struct request *rq)
          * and to it is freed is accounted as io that is in progress at
          * the driver side.
          */
-       if (blk_account_rq(rq))
+       if (blk_account_rq(rq)) {
                 q->in_flight[rq_is_sync(rq)]++;
+               /*
+                * Mark this device as supporting hardware queuing, if
+                * we have more IOs in flight than 4.
+                */
+               if (!blk_queue_queuing(q) && queue_in_flight(q) > 4)
+                       set_bit(QUEUE_FLAG_CQ, &q->queue_flags);
+       }
  }
...

Mmm.. So is this code actually trying to rely upon the software being quick
enough to queue five or more commands before the drive completes one of them?

Wouldn't a better way be to just look at the queue_depth, for SCSI/SATA at least?

-ml

  parent reply	other threads:[~2010-02-22 21:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-20 13:28 bad performance with SSD since kernel version 2.6.32 Benjamin S.
2010-02-20 18:35 ` Robert Hancock
2010-02-21  1:26   ` Benjamin S.
     [not found]     ` <51f3faa71002210922i542c37f0j9e0e4a84d0977f90@mail.gmail.com>
     [not found]       ` <20100221225544.5a9ded51@pluto-lenny.milky.way>
     [not found]         ` <51f3faa71002211400u2177660ei1c0dc3d9306b146e@mail.gmail.com>
2010-02-22 13:18           ` Benjamin S.
2010-02-22 14:41             ` Robert Hancock
2010-02-22 19:05             ` Jens Axboe
2010-02-22 20:25               ` Benjamin S.
2010-02-23  6:22                 ` Jens Axboe
2010-02-22 21:49               ` Mark Lord [this message]
2010-02-22 23:22                 ` Robert Hancock
2010-02-23  6:21                   ` Jens Axboe
2010-02-24 15:09                     ` Mark Lord
2010-02-24 15:34                       ` Jens Axboe
2010-02-24 15:48                         ` Mark Lord
2010-02-24 19:05                           ` 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=4B82FBF4.10702@teksavvy.com \
    --to=kernel@teksavvy.com \
    --cc=hancockrwd@gmail.com \
    --cc=jens.axboe@oracle.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=sbenni@gmx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.