linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/2] target: Add TFO->complete_irq queue_work bypass
@ 2015-05-22  7:57 Nicholas A. Bellinger
  2015-05-22  7:57 ` [RFC 1/2] target: Add support for fabric IRQ completion Nicholas A. Bellinger
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Nicholas A. Bellinger @ 2015-05-22  7:57 UTC (permalink / raw)
  To: target-devel
  Cc: linux-scsi, linux-kernel, Christoph Hellwig, Hannes Reinecke,
	Sagi Grimberg, Nicholas Bellinger

From: Nicholas Bellinger <nab@linux-iscsi.org>

Hi HCH & Co,

Here is RFC code for adding target_core_fabric_ops->complete_irq
bypass that allows fabrics to invoke response callbacks directly
from target_complete_cmd() IRQ context.

It breaks up existing target_complete_ok_work() code into three
pieces:

  - transport_complete_task_attr()
  - target_complete_ok_pre()
  - target_complete_irq()

and allows target_complete_irq() be called directly from IRQ context
if no special case se_cmd handling requirements exist.

The three cases that trigger queue_work() process context are:

  - non GOOD status
  - ORDERED task sync
  - non NULL se_cmd->transport_complete_callback()

It also includes converting target_restart_delayed_cmds() to use
llist_head, and checking within transport_complete_task_attr() to
determine if dev_ordered_sync is non zero, ahead of doing the
llist_del_all() -> cmpxchg of outstanding ordered tags.

This allows loopback LLD code to bypass the extra queue_work, and
invoke it's ->scsi_done() callback directly from IRQ context.

WDYT..?

--nab

Nicholas Bellinger (2):
  target: Add support for fabric IRQ completion
  loopback: Enable TFO->complete_irq for fast-path ->scsi_done

 drivers/target/loopback/tcm_loop.c     |   1 +
 drivers/target/target_core_device.c    |   2 +-
 drivers/target/target_core_tpg.c       |   1 +
 drivers/target/target_core_transport.c | 165 ++++++++++++++++++++++++---------
 include/target/target_core_base.h      |   5 +-
 include/target/target_core_fabric.h    |   1 +
 6 files changed, 127 insertions(+), 48 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-06-29  9:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-22  7:57 [RFC 0/2] target: Add TFO->complete_irq queue_work bypass Nicholas A. Bellinger
2015-05-22  7:57 ` [RFC 1/2] target: Add support for fabric IRQ completion Nicholas A. Bellinger
2015-06-09  7:27   ` Christoph Hellwig
2015-06-29  9:51     ` Sagi Grimberg
2015-05-22  7:57 ` [RFC 2/2] loopback: Enable TFO->complete_irq for fast-path ->scsi_done Nicholas A. Bellinger
2015-06-03 12:57 ` [RFC 0/2] target: Add TFO->complete_irq queue_work bypass Christoph Hellwig
2015-06-04  7:06   ` Nicholas A. Bellinger
2015-06-04 17:01     ` Sagi Grimberg
2015-06-09  7:19     ` Christoph Hellwig
2015-06-10  7:10       ` Nicholas A. Bellinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).