On 02/25/15 18:36, Sagi Grimberg wrote:
> - About shared tags. So for scsi commands and TMFs we don't have a
>   problem since we are guaranteed ITTs are unique. I wander how will we
>   allocate a unique ITT for iscsi specific tasks (LOGIN, TEXT, LOGOUT,
>   NOOP_OUT). My implementation did it per-session, so I reserved a range
>   of ITTs for iscsi specific commands (in a kfifo), I wander how we can
>   do that for multiple sessions. We need some kind of tag allocator for
>   iscsi specific commands. Perhaps Bart/Christoph can advise if a LLD
>   can allocate a unique tag for an LLD specific command using block
>   layer tags.

It is possible to allocate a reserved tag from the blk-mq layer by
passing true as the fourth argument when calling blk_mq_alloc_request().
However, using that mechanism from inside a SCSI LLD driver would
require changes in the SCSI core. The code in scsi_mq_setup_tags()
initializes the number of reserved tags to zero. Additionally, the flag
use_blk_tags in the SCSI host template makes it easy to use the same
code paths in a SCSI LLD in multiqueue and single queue mode. However,
the single queue block layer tag allocator does not support reserved
tags (see also blk_queue_init_tags()). So it is probably easier to use a
custom tag allocator in the iSCSI initiator for iSCSI-specific tasks
instead of trying to allocate tags for these tasks from the block layer.

Bart.

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to open-iscsi+unsubscr...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to