Re: [PATCH-v2] iser-target: Match FRMR descriptors to available session tags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2014-03-23 at 09:32 +0200, Or Gerlitz wrote:
> On 22/03/2014 04:17, Nicholas A. Bellinger wrote:
> > @ -508,11 +508,18 @@ isert_conn_create_fastreg_pool(struct isert_conn *isert_conn, u8 pi_support)
> >   {
> >   	struct fast_reg_descriptor *fr_desc;
> >   	struct isert_device *device = isert_conn->conn_device;
> > -	int i, ret;
> > +	struct se_session *se_sess = isert_conn->conn->sess->se_sess;
> > +	struct se_node_acl *se_nacl = se_sess->se_node_acl;
> > +	int i, ret, tag_num;
> > +	/*
> > +	 * Setup the number of FRMRs based upon the number of tags
> > +	 * available to session in iscsi_target_locate_portal().
> > +	 */
> > +	tag_num = max_t(u32, ISCSIT_MIN_TAGS, se_nacl->queue_depth);
> > +	tag_num = (tag_num * 2) + ISCSIT_EXTRA_TAGS;
> 
> so why we need to use the 2x factor? also ISCSIT_EXTRA_TAGS is defined in
> drivers/target/iscsi/iscsi_target_core.h, so I'm not clear how this 
> supposed to get compiled..
> 

So the extra tag pre-allocations are necessary because the CmdSN window
is increased before posting the command response, but the tag itself is
not released until after the command is acknowledged.

With traditional iSCSI the ACK is done using ExpStatSN in the RX path,
and with iser-target the ACK is done using (possibly coalesced)
completion interrupts.

Also given the tag pre-allocation is now using percpu_ida, avoiding the
slow-path case in percpu_ida_alloc() where tags have to be stolen from
another CPU is beneficial to performance as well.

--nab

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux