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

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.

  reply	other threads:[~2015-01-15  9: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 [this message]
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

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=20150115092836.GA14051@infradead.org \
    --to=hch@infradead.org \
    --cc=Kernel-team@fb.com \
    --cc=axboe@fb.com \
    --cc=dan.j.williams@intel.com \
    --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 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).