From: Jens Axboe <axboe@fb.com>
To: Dan Williams <dan.j.williams@intel.com>, Shaohua Li <shli@fb.com>
Cc: 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 12:15:19 -0700 [thread overview]
Message-ID: <54B811C7.8000700@fb.com> (raw)
In-Reply-To: <CAPcyv4imdCq83gN+KOWsu4=0arB59um8upnaGRV0UxhBwc6T4A@mail.gmail.com>
On 01/15/2015 11:59 AM, Dan Williams wrote:
> On Thu, Jan 15, 2015 at 10:40 AM, Shaohua Li <shli@fb.com> wrote:
>> On Thu, Jan 15, 2015 at 01:28:36AM -0800, Christoph Hellwig wrote:
>>> On Wed, Jan 14, 2015 at 09:37:30AM -0800, Dan Williams wrote:
>>>> libsas uses the libata allocated tag for NCQ. libsas first asks
>>>> libata to allocate a tag/qc for ncq, then it creates a sas_task and
>>>> assigns the scsi tag. To use a generic allocator I assume you would
>>>> need to flip that ordering to allocate the sas_task tag first and then
>>>> use that plus another key to allocate a sub-tag for ata to use for
>>>> NCQ.
>>>
>>> As far as I can tell all libsas drivers as well as ipr use block
>>> layer tagging, so they always get requests/scsi_cmnds with a tag
>>> already assigned. For libsas drivers currently use per-LUN tags,
>>> although with scsi-mq we will get per-host tags.
>>>
>>> libata on the other hand at the moment assigns it's own tags,
>>> which are only stored in struct ata_queued_cmd, but never in the
>>> request. libata assigns tags per ata_host. Each ata_host
>>> might have multiple ports, which each get their own Scsi_Host
>>> allocated.
>>>
>>> Given that ATA NCQ has a fairly low queue depth I assume we want
>>> to stick to assigning ATA tags per-device, but due to the host
>>> per device scheme libata that even works using scsi-mq. (Q: how do tags
>>> work when port mulipliers are involved?)
>>>
>>> So for SAS driver using libata we will need a separate tag allocator,
>>> but that one might as well be in libsas instead of keeping it in libata.
>>
>> Yep, the ATA NCQ should work well with block tag as each port is a
>> scsi host. So looks it's not easy to map scsi tag to ATA tag for libsas
>> and we eventually will have another tag allocator for libsas.
>>
>> Tejun,
>> I'm afraid I can't work out a patch to delete the old tag allocator for
>> libata. Can we take this patch series first and later we can delete the
>> old tag allocator till libsas has its own tag allocator. This isn't
>> optimal, but I really know nothing about libsas.
>
> 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.
- 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.
--
Jens Axboe
next prev parent reply other threads:[~2015-01-15 19:16 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 [this message]
2015-01-15 19:51 ` Dan Williams
2015-01-15 22:28 ` 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=54B811C7.8000700@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.