tmp_suning_uos_patched/drivers/target/tcm_fc
Nicholas Bellinger 5f544cfac9 tcm_fc: Convert to per-cpu command map pre-allocation of ft_cmd
This patch converts tcm_fc to use transport_init_session_tags()
pre-allocation logic for struct ft_cmd descriptors using per-cpu
session tag pooling in order to effectively avoid memory allocation
+ release for each received I/O.

It adds percpu_ida_alloc() in ft_recv_cmd() to obtain an tag and
locate ft_cmd from se_sess->sess_cmd_map[], and percpu_ida_free()
in ft_free_cmd() to release the tag based upon se_cmd->map_tag id.

It also uses a TCM_FC_DEFAULT_TAGS value of 512, that puts the
per se_sess->sess_cmd_map allocation at ~360K on 64-bit.

v2 changes:

  - Handle possible tag < 0 failure with GFP_ATOMIC

Cc: Mark Rustad <mark.d.rustad@intel.com>
Cc: Robert Love <robert.w.love@intel.com>
Cc: Kent Overstreet <kmo@daterainc.com>
Signed-off-by: Nicholas Bellinger <nab@daterainc.com>
2013-10-01 21:40:55 -07:00
..
Kconfig [SCSI] tcm_fc: Adding FC_FC4 provider (tcm_fc) for FCoE target (TCM - target core) support 2011-05-17 10:52:46 +04:00
Makefile tcm_fc: Makefile cleanups 2011-07-22 09:37:47 +00:00
tcm_fc.h tcm_fc: Convert to per-cpu command map pre-allocation of ft_cmd 2013-10-01 21:40:55 -07:00
tfc_cmd.c tcm_fc: Convert to per-cpu command map pre-allocation of ft_cmd 2013-10-01 21:40:55 -07:00
tfc_conf.c target: replace strict_strto*() with kstrto*() 2013-08-12 20:31:44 -07:00
tfc_io.c tcm_fc: Check for aborted sequence 2013-04-25 01:05:28 -07:00
tfc_sess.c tcm_fc: Convert to per-cpu command map pre-allocation of ft_cmd 2013-10-01 21:40:55 -07:00