* [PATCH 0/2] qla2xxx: Fixes for target-pending
@ 2016-02-10 23:59 Himanshu Madhani
2016-02-10 23:59 ` [PATCH 1/2] target/transport: add flag to indicate CPU Affinity is observed Himanshu Madhani
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Himanshu Madhani @ 2016-02-10 23:59 UTC (permalink / raw)
To: target-devel, nab; +Cc: giridhar.malavali, linux-scsi, himanshu.madhani
Hi Nic,
Here are the patches that addresses review comments from Bart
and Christoph. See email threads
http://www.spinics.net/lists/target-devel/msg11418.html
http://www.spinics.net/lists/target-devel/msg11419.html
Please apply these patches to target-pending.
Thanks,
Himanshu
Quinn Tran (2):
target/transport: add flag to indicate CPU Affinity is observed
qla2xxx: use TARGET_SCF_USE_CPUID flag to indiate CPU Affinity
drivers/scsi/qla2xxx/qla_target.c | 4 ++--
drivers/scsi/qla2xxx/tcm_qla2xxx.c | 3 +++
drivers/target/target_core_transport.c | 12 +++++++++---
include/target/target_core_base.h | 2 ++
4 files changed, 16 insertions(+), 5 deletions(-)
--
1.7.7
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] target/transport: add flag to indicate CPU Affinity is observed
2016-02-10 23:59 [PATCH 0/2] qla2xxx: Fixes for target-pending Himanshu Madhani
@ 2016-02-10 23:59 ` Himanshu Madhani
2016-02-10 23:59 ` [PATCH 2/2] qla2xxx: use TARGET_SCF_USE_CPUID flag to indiate CPU Affinity Himanshu Madhani
2016-02-11 7:11 ` [PATCH 0/2] qla2xxx: Fixes for target-pending Nicholas A. Bellinger
2 siblings, 0 replies; 4+ messages in thread
From: Himanshu Madhani @ 2016-02-10 23:59 UTC (permalink / raw)
To: target-devel, nab; +Cc: giridhar.malavali, linux-scsi, himanshu.madhani
From: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Quinn Tran <quinn.tran@qlogic.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Fixes: fb3269b ("qla2xxx: Add selective command queuing")
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
drivers/target/target_core_transport.c | 12 +++++++++---
include/target/target_core_base.h | 2 ++
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 3e6a98b..6348ae0 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -776,10 +776,10 @@ void target_complete_cmd(struct se_cmd *cmd, u8 scsi_status)
cmd->transport_state |= (CMD_T_COMPLETE | CMD_T_ACTIVE);
spin_unlock_irqrestore(&cmd->t_state_lock, flags);
- if (cmd->cpuid == -1)
- queue_work(target_completion_wq, &cmd->work);
- else
+ if (cmd->se_cmd_flags & SCF_USE_CPUID)
queue_work_on(cmd->cpuid, target_completion_wq, &cmd->work);
+ else
+ queue_work(target_completion_wq, &cmd->work);
}
EXPORT_SYMBOL(target_complete_cmd);
@@ -1491,6 +1491,12 @@ int target_submit_cmd_map_sgls(struct se_cmd *se_cmd, struct se_session *se_sess
*/
transport_init_se_cmd(se_cmd, se_tpg->se_tpg_tfo, se_sess,
data_length, data_dir, task_attr, sense);
+
+ if (flags & TARGET_SCF_USE_CPUID)
+ se_cmd->se_cmd_flags |= SCF_USE_CPUID;
+ else
+ se_cmd->cpuid = WORK_CPU_UNBOUND;
+
if (flags & TARGET_SCF_UNKNOWN_SIZE)
se_cmd->unknown_data_length = 1;
/*
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index d71a3ea..e8c8c08 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -141,6 +141,7 @@ enum se_cmd_flags_table {
SCF_COMPARE_AND_WRITE_POST = 0x00100000,
SCF_PASSTHROUGH_PROT_SG_TO_MEM_NOALLOC = 0x00200000,
SCF_ACK_KREF = 0x00400000,
+ SCF_USE_CPUID = 0x00800000,
};
/* struct se_dev_entry->lun_flags and struct se_lun->lun_access */
@@ -188,6 +189,7 @@ enum target_sc_flags_table {
TARGET_SCF_BIDI_OP = 0x01,
TARGET_SCF_ACK_KREF = 0x02,
TARGET_SCF_UNKNOWN_SIZE = 0x04,
+ TARGET_SCF_USE_CPUID = 0x08,
};
/* fabric independent task management function values */
--
1.7.7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] qla2xxx: use TARGET_SCF_USE_CPUID flag to indiate CPU Affinity
2016-02-10 23:59 [PATCH 0/2] qla2xxx: Fixes for target-pending Himanshu Madhani
2016-02-10 23:59 ` [PATCH 1/2] target/transport: add flag to indicate CPU Affinity is observed Himanshu Madhani
@ 2016-02-10 23:59 ` Himanshu Madhani
2016-02-11 7:11 ` [PATCH 0/2] qla2xxx: Fixes for target-pending Nicholas A. Bellinger
2 siblings, 0 replies; 4+ messages in thread
From: Himanshu Madhani @ 2016-02-10 23:59 UTC (permalink / raw)
To: target-devel, nab; +Cc: giridhar.malavali, linux-scsi, himanshu.madhani
From: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Quinn Tran <quinn.tran@qlogic.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Fixes: fb3269b ("qla2xxx: Add selective command queuing")
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
---
drivers/scsi/qla2xxx/qla_target.c | 4 ++--
drivers/scsi/qla2xxx/tcm_qla2xxx.c | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index 49a421a..9852319 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -4013,7 +4013,8 @@ static int qlt_handle_cmd_for_atio(struct scsi_qla_host *vha,
cmd->cmd_in_wq = 1;
cmd->cmd_flags |= BIT_0;
- cmd->se_cmd.cpuid = -1;
+ cmd->se_cmd.cpuid = ha->msix_count ?
+ ha->tgt.rspq_vector_cpuid : WORK_CPU_UNBOUND;
spin_lock(&vha->cmd_list_lock);
list_add_tail(&cmd->cmd_list, &vha->qla_cmd_list);
@@ -4021,7 +4022,6 @@ static int qlt_handle_cmd_for_atio(struct scsi_qla_host *vha,
INIT_WORK(&cmd->work, qlt_do_work);
if (ha->msix_count) {
- cmd->se_cmd.cpuid = ha->tgt.rspq_vector_cpuid;
if (cmd->atio.u.isp24.fcp_cmnd.rddata)
queue_work_on(smp_processor_id(), qla_tgt_wq,
&cmd->work);
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index 7c8e255..c1461d2 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -462,6 +462,9 @@ static int tcm_qla2xxx_handle_cmd(scsi_qla_host_t *vha, struct qla_tgt_cmd *cmd,
if (bidi)
flags |= TARGET_SCF_BIDI_OP;
+ if (se_cmd->cpuid != WORK_CPU_UNBOUND)
+ flags |= TARGET_SCF_USE_CPUID;
+
sess = cmd->sess;
if (!sess) {
pr_err("Unable to locate struct qla_tgt_sess from qla_tgt_cmd\n");
--
1.7.7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] qla2xxx: Fixes for target-pending
2016-02-10 23:59 [PATCH 0/2] qla2xxx: Fixes for target-pending Himanshu Madhani
2016-02-10 23:59 ` [PATCH 1/2] target/transport: add flag to indicate CPU Affinity is observed Himanshu Madhani
2016-02-10 23:59 ` [PATCH 2/2] qla2xxx: use TARGET_SCF_USE_CPUID flag to indiate CPU Affinity Himanshu Madhani
@ 2016-02-11 7:11 ` Nicholas A. Bellinger
2 siblings, 0 replies; 4+ messages in thread
From: Nicholas A. Bellinger @ 2016-02-11 7:11 UTC (permalink / raw)
To: Himanshu Madhani; +Cc: target-devel, giridhar.malavali, linux-scsi
On Wed, 2016-02-10 at 18:59 -0500, Himanshu Madhani wrote:
> Hi Nic,
>
> Here are the patches that addresses review comments from Bart
> and Christoph. See email threads
>
> http://www.spinics.net/lists/target-devel/msg11418.html
> http://www.spinics.net/lists/target-devel/msg11419.html
>
> Please apply these patches to target-pending.
>
> Thanks,
> Himanshu
>
> Quinn Tran (2):
> target/transport: add flag to indicate CPU Affinity is observed
> qla2xxx: use TARGET_SCF_USE_CPUID flag to indiate CPU Affinity
>
> drivers/scsi/qla2xxx/qla_target.c | 4 ++--
> drivers/scsi/qla2xxx/tcm_qla2xxx.c | 3 +++
> drivers/target/target_core_transport.c | 12 +++++++++---
> include/target/target_core_base.h | 2 ++
> 4 files changed, 16 insertions(+), 5 deletions(-)
>
Applied to target-pending/master.
Thanks Himanshu & Quinn!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-11 7:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-10 23:59 [PATCH 0/2] qla2xxx: Fixes for target-pending Himanshu Madhani
2016-02-10 23:59 ` [PATCH 1/2] target/transport: add flag to indicate CPU Affinity is observed Himanshu Madhani
2016-02-10 23:59 ` [PATCH 2/2] qla2xxx: use TARGET_SCF_USE_CPUID flag to indiate CPU Affinity Himanshu Madhani
2016-02-11 7:11 ` [PATCH 0/2] qla2xxx: Fixes for target-pending Nicholas A. Bellinger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.