linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Mark Lord <kernel@teksavvy.com>
Cc: Robert Hancock <hancockrwd@gmail.com>,
	"Benjamin S." <sbenni@gmx.de>, Jeff Garzik <jgarzik@pobox.com>,
	linux-ide@vger.kernel.org
Subject: Re: bad performance with SSD since kernel version 2.6.32
Date: Wed, 24 Feb 2010 16:34:09 +0100	[thread overview]
Message-ID: <20100224153409.GC1025@kernel.dk> (raw)
In-Reply-To: <4B854136.5080305@teksavvy.com>

On Wed, Feb 24 2010, Mark Lord wrote:
> On 02/23/10 01:21, Jens Axboe wrote:
>> On Mon, Feb 22 2010, Robert Hancock wrote:
>>> On Mon, Feb 22, 2010 at 3:49 PM, Mark Lord<kernel@teksavvy.com>  wrote:
>>>> 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?
>>
>> Yes, it'll trigger easily. If it's the boot drive, it'll be on before
>> booting has completed.
> ...
>
> Mmm.. but that all assumes (1) a fast CPU and (2) a slow mechanical drive.
> Neither of which are true in many modern systems.

No, that's simply not true. I didn't base the above comment on
speculation, it's observed behaviour. Granted it's a heuristic and as
such not infallible, but it works much better than you seem to assume.

FWIW, on both my desktop and laptop with SSD drives it's on before on
before you log in. Besides, the code wont have any effect on a
mechanical drive (slow or not), since it's specifically only on for
non-rotation drives.

-- 
Jens Axboe


  reply	other threads:[~2010-02-24 15:34 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
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 [this message]
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=20100224153409.GC1025@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=hancockrwd@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=kernel@teksavvy.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 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).