forked from hardkernel/linux
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Cc: Robert Love <[email protected]> Cc: Kent Overstreet <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
- Loading branch information
Nicholas Bellinger
authored and
Nicholas Bellinger
committed
Oct 2, 2013
1 parent
15c03dd
commit 5f544cf
Showing
3 changed files
with
17 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters