All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Hannes Reinecke <hare@suse.de>
Cc: Christoph Hellwig <hch@infradead.org>,
	Robert Elliot <elliot@hp.com>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>,
	Jens Axboe <axboe@kernel.dk>
Subject: Re: Question: request tag usage
Date: Fri, 26 Sep 2014 01:03:08 -0700	[thread overview]
Message-ID: <20140926080308.GA21137@infradead.org> (raw)
In-Reply-To: <542507C9.2060901@suse.de>

On Fri, Sep 26, 2014 at 08:29:29AM +0200, Hannes Reinecke wrote:
> Hi Christoph,
> 
> as discussed it would make sense to use the request->tag in eg
> scmd_printk() to identify the command.
> Which I duly did, only to figure out that the tag is always '-1', ie
> tagging is not in use.
> (Which is okay from the SCSI side, seeing the TCQ is basically a
> SCSI parallel thing).

tag are still a live part of SAM for every transport, they've only
been renamed to "command identifier" in SAM-4 to confuse everyone.

> Looking closer I found plenty of code for handling tags in the block
> layer (and the blk-mq stuff, of course), but virtually none of the
> non-SPI driver seems to be using them.

A quick grep for scsi_activate_tcq disagrees with you.

> Which makes the original idea a bit pointless, seeing that we need
> to identify the command _always_, and not just if the host happens
> to support tagging.
> 
> Which leads me to some questions:
> - Is the stuff in blk-mq supposed to work as a superset of SCSI TCQ?

Yes.

> - If so, should any HBAs with a queue depth > 1 (which does not
>   support TCQ) set the tag of a command?
>   (that's what I've initially thought would happen ...)
> - If not (and the ->tag field is basically unused), can't we
>   have the HBA to fill in a value here?

blk-mq will always provide, and does rely on a valid request->tag.
A LLDD can still use it's own internal tagging or mess with scmd->tag,
although in general it should benefit from using the block layer
tagging.

> Which apparently was too much to hope for ...

I guess for now we'll need to stay with the command pointer address.
We can revisit this once the old request layer is gone.


  reply	other threads:[~2014-09-26  8:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26  6:29 Question: request tag usage Hannes Reinecke
2014-09-26  8:03 ` Christoph Hellwig [this message]
2014-09-26  8:20   ` Hannes Reinecke
2014-09-26 10:12     ` James Bottomley
2014-09-26 12:41       ` Hannes Reinecke
2014-09-26 13:52     ` Elliott, Robert (Server Storage)

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=20140926080308.GA21137@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=elliot@hp.com \
    --cc=hare@suse.de \
    --cc=linux-scsi@vger.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.