From: Nicholas Bellinger Date: Mon, 23 Sep 2013 19:12:42 +0000 (-0700) Subject: tcm_fc: Convert to per-cpu command map pre-allocation of ft_cmd X-Git-Tag: v3.13-rc1~5^2~39 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f544cfac956971099e906f94568bc3fd1a7108a;p=pandora-kernel.git 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 Cc: Robert Love Cc: Kent Overstreet Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed