On 2/26/2015 5:30 PM, Bart Van Assche wrote:
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()).
Yes I looked at that, but as you said, it does not a really fit SCSI LLDs.
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.
That's what I thought, a session would allocate an array of mgmt
iscsi specific commands, each assigned with a unique ITT which is
out of scsi_cmds_max range. I guess I just wanted to understand if
there is a nicer way of doing this instead of each LLD with similar
needs doing the same thing...
Sagi.
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.