From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755772Ab0IFVhR (ORCPT ); Mon, 6 Sep 2010 17:37:17 -0400 Received: from smtp103.sbc.mail.re3.yahoo.com ([66.196.96.86]:42878 "HELO smtp103.sbc.mail.re3.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755180Ab0IFVhA (ORCPT ); Mon, 6 Sep 2010 17:37:00 -0400 X-Yahoo-SMTP: fzDSGlOswBCWnIOrNw7KwwK1j9PqyNbe5PtLKiS4dDU.UNl_t6bdEZu9tTLW X-YMail-OSG: t_lvk.MVM1l9t5M4cQwZ9AJI3IUaUTMuAhgytqyXkyGVaTb MThicabLB2pNBKU4bHYt8Eo2JBGvYsO6BH33HmzmElXOqfub9esigJZObPGa qnwQ5vaqESfZA3UI3BvTkM5VX7O.Yby2TRDeOpUXsjgl01J6lc.4lm1PPZyC EfAMsjQGjhH.6L8ifFPlz6n4L_Y8VyYf6p0m5ozsVMjFjs..feaMS13LmYWx _jo51Um6KyTlznVTH6OdkmOZVtrAMCvxMTIm1Cnfyiln.QDgQC_Q6V3yhgh3 8dmpWen4XIM7Eo_n.VO56upHTvsLLJqoIfHZH.NM60DZdeg4gCJ0kXn51n2R U6N8Sj_avapM8k6eyoNfmzIAXQop4U0bu9MQnDGW2B8OUrcvb6xwWb3hkHHm 5ljcpdLR.byo99uRgUpLFT7XszinEQ8Xha8uAnRy8nYeJGNgoW6OGgD4XLXP u2Ms8RgTQQQ8. X-Yahoo-Newman-Property: ymail-3 From: "Nicholas A. Bellinger" To: linux-scsi , linux-kernel Cc: Christoph Hellwig , FUJITA Tomonori , Mike Christie , Hannes Reinecke , James Bottomley , Konrad Rzeszutek Wilk , Boaz Harrosh , Richard Sharpe , Nicholas Bellinger Subject: [PATCH 0/6] tcm: Add TFO->new_cmd_map() and TFO->task_sg_chaining=1 Date: Mon, 6 Sep 2010 14:36:50 -0700 Message-Id: <1283809010-13619-1-git-send-email-nab@linux-iscsi.org> X-Mailer: git-send-email 1.5.6.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicholas Bellinger Greetings all, This patch series adds two new features to the TCM v4 data I/O path that will be included in v4.0.0-rc4 for TCM_Loop (included below in patch #5) and other WIP HW target mode drivers. The first patch adds support for TFO->new_cmd_map() / TRANSPORT_NEW_CMD_MAP which allows fabric modules to use a callback in TCM backstore processing thread context when doing the second stage setup of a new struct se_cmd descriptor. The second patch adds support for greating a struct se_cmd wide SGL array chain using include/linux/scatterlist.h:sg_chain() from contigiously allocated struct se_task->task_sg[] arrays. This includes the use of a trailing padding SGL within struct se_task->task_sg[] to hold the SGL link to the next struct se_task->task_sg[]. The third and forth patches involve the conversion of two spinlocks which now may used in interrupt context from __transport_get_lun_for_cmd(), and makes them use spin_lock_irq() and spin_unlock_irq() and handles a couple of special cases in target_core_mib.c for reference counting. And finally the fifth path converts the TCM_Loop virtual SCSI LLD module to use the new TFO->new_cmd_map() / TRANSPORT_NEW_CMD_MAP, and removes the original per struct tcm_loop_hba->tl_hba_qobj. This will give us a nice reduction in context-switches per TCM_Loop I/O now that this patch removes the original per HBA tcm_loop_processing_thread() overhead in TCM_Loop v4 code! Comments are welcome, Signed-off-by: Nicholas A. Bellinger Nicholas Bellinger (6): tcm: Add support for TRANSPORT_NEW_CMD_MAP tcm: Add support for struct target_core_fabric_ops->task_sg_chaining tcm/ramdisk: Add special case for TFO->task_sg_chaining=1 with RAMDISK_DR tcm: Convert struct se_node_acl->device_list_lock to spin_*lock_irq() tcm: Convert struct se_device->dev_status_lock to spin_*lock_irq() tcm_loop: Convert to use new optimized TFO->new_cmd_map() caller drivers/target/target_core_device.c | 94 +++++--------- drivers/target/target_core_fabric_configfs.c | 8 +- drivers/target/target_core_mib.c | 28 ++++- drivers/target/target_core_rd.c | 45 ++++++- drivers/target/target_core_tpg.c | 18 ++- drivers/target/target_core_transport.c | 160 ++++++++++++++++++++++-- drivers/target/target_core_ua.c | 20 ++-- drivers/target/tcm_loop/tcm_loop_configfs.c | 35 +----- drivers/target/tcm_loop/tcm_loop_core.h | 2 - drivers/target/tcm_loop/tcm_loop_fabric.c | 61 --------- drivers/target/tcm_loop/tcm_loop_fabric.h | 2 - drivers/target/tcm_loop/tcm_loop_fabric_scsi.c | 100 +++++----------- drivers/target/tcm_loop/tcm_loop_fabric_scsi.h | 2 +- include/target/target_core_base.h | 11 ++- include/target/target_core_device.h | 1 - include/target/target_core_fabric_ops.h | 12 ++ include/target/target_core_tpg.h | 1 + include/target/target_core_transport.h | 3 +- 18 files changed, 332 insertions(+), 271 deletions(-)