All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@fb.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Shaohua Li <shli@fb.com>, Christoph Hellwig <hch@infradead.org>,
	Tejun Heo <tj@kernel.org>,
	IDE/ATA development list <linux-ide@vger.kernel.org>,
	Kernel-team@fb.com
Subject: Re: [PATCH v2 3/3] libata: use blk taging
Date: Thu, 15 Jan 2015 15:28:14 -0700	[thread overview]
Message-ID: <54B83EFE.9000000@fb.com> (raw)
In-Reply-To: <CAPcyv4iu4jwJsfuYTBgY1yfxts2NgvSfYhKo_wegT5r3E7N2yQ@mail.gmail.com>

On 01/15/2015 12:51 PM, Dan Williams wrote:
> On Thu, Jan 15, 2015 at 11:15 AM, Jens Axboe <axboe@fb.com> wrote:
>> On 01/15/2015 11:59 AM, Dan Williams wrote:
>>> I still don't understand what we get by adding this new allocator
>>> besides complexity, am I missing something?
>>
>>
>> Two things:
>>
>> - libata tag allocator sucks. Like seriously sucks, it's almost a worst case
>> implementation.
>
> Not questioning its suckiness, but I thought the SATA suckiness made
> it moot.  Apparently not in all cases...

The laptop I'm typing this from does 145K 4k random read IOPS, it's 
definitely into the area of it mattering.

>> - Much better to have a single unified allocator to tweak and tune, than
>> having separate version.
>>
>> #2 is still lacking a bit, but I don't think it'd be impossible to unify it
>> all.
>
> https://bugzilla.kernel.org/show_bug.cgi?id=87101 has gone silent, I
> need to ping it.  That's my primary concern with the current proposal,
> supporting controllers that have weird/unnatural relationships  with
> the value of the tag.

Unfortunately parts of SATA is as crappy as USB when it comes to things 
like that. I can understand why some controllers would like to see a 
natural ordering of the tags (even if it is stupid to require, but AHCI 
doesn't help there), but it makes very little sense why it would break 
others. Looks like this particular case was likely a different bug, the 
ordering just made it show up more easily.

And speaking of strict ordering, the blk-mq tagging should actually 
improve ordering. The libata implementation orders globally, but that'll 
equally break down on multiple processes accessing the device. For that 
case, you end up interleaving, and if the drive does strict by-tag 
ordering of what IO to do, it'll go random pretty quickly. The blk-mq 
implementation preserves ordering between threads in that case, due to 
how the last tag is cached. So I would expect to see an improvement in 
behavior with that for use cases that offload IO to thread pools (like 
posix aio, or private implementations in programs).

-- 
Jens Axboe


      reply	other threads:[~2015-01-15 22:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-18 18:46 [PATCH v2 1/3] block: support different tag allocation policy Shaohua Li
2014-12-18 18:46 ` [PATCH v2 2/3] blk-mq: add " Shaohua Li
2014-12-22 23:25   ` Jens Axboe
2015-01-02 19:43     ` Shaohua Li
2014-12-18 18:46 ` [PATCH v2 3/3] libata: use blk taging Shaohua Li
2015-01-09 18:15   ` Shaohua Li
2015-01-09 21:43     ` Tejun Heo
2015-01-09 21:59       ` Shaohua Li
2015-01-09 22:12         ` Shaohua Li
2015-01-14  8:08           ` Dan Williams
2015-01-14 16:30             ` Shaohua Li
2015-01-14 17:09               ` Dan Williams
     [not found]               ` <CAPcyv4hMwpGzeaovnXtqyYFM46wodRamZd7CNVoR43JJYh0Tjg@mail.gmail.com>
2015-01-14 17:13                 ` Shaohua Li
2015-01-14 17:37                   ` Dan Williams
2015-01-15  9:28                     ` Christoph Hellwig
2015-01-15 15:02                       ` Tejun Heo
2015-01-15 18:40                       ` Shaohua Li
2015-01-15 18:57                         ` Tejun Heo
2015-01-15 18:59                         ` Dan Williams
2015-01-15 19:03                           ` Tejun Heo
2015-01-15 19:15                           ` Jens Axboe
2015-01-15 19:51                             ` Dan Williams
2015-01-15 22:28                               ` Jens Axboe [this message]

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=54B83EFE.9000000@fb.com \
    --to=axboe@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=dan.j.williams@intel.com \
    --cc=hch@infradead.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=shli@fb.com \
    --cc=tj@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 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.