summaryrefslogtreecommitdiff
path: root/drivers/target/target_core_iblock.h
diff options
context:
space:
mode:
authorMike Christie <michael.christie@oracle.com>2021-02-27 20:00:03 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2021-03-05 01:37:02 +0300
commit415ccd9811da38aed04f54051c8ae87699c4e6c2 (patch)
tree723d729ea97b90c40fec06062324c9c0d913673e /drivers/target/target_core_iblock.h
parent302990ac3b1b1a2b7b66f59a5c88038a51fbe18e (diff)
downloadlinux-415ccd9811da38aed04f54051c8ae87699c4e6c2.tar.xz
scsi: target: iblock: Add backend plug/unplug callouts
This patch adds plug/unplug callouts for iblock. For an initiator driver like iSCSI which wants to pass multiple cmds to its xmit thread instead of one cmd at a time, this increases IOPS by around 10% with vhost-scsi (combined with the last patches we can see a total 40-50% increase). For driver combos like tcm_loop and faster drivers like the iSER initiator, we can still see IOPS increase by 20-30% when tcm_loop's nr_hw_queues setting is also increased. Link: https://lore.kernel.org/r/20210227170006.5077-23-michael.christie@oracle.com Signed-off-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target/target_core_iblock.h')
-rw-r--r--drivers/target/target_core_iblock.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/target/target_core_iblock.h b/drivers/target/target_core_iblock.h
index cefc641145b3..8c55375d2f75 100644
--- a/drivers/target/target_core_iblock.h
+++ b/drivers/target/target_core_iblock.h
@@ -4,6 +4,7 @@
#include <linux/atomic.h>
#include <linux/refcount.h>
+#include <linux/blkdev.h>
#include <target/target_core_base.h>
#define IBLOCK_VERSION "4.0"
@@ -17,6 +18,14 @@ struct iblock_req {
#define IBDF_HAS_UDEV_PATH 0x01
+#define IBD_PLUGF_PLUGGED 0x01
+
+struct iblock_dev_plug {
+ struct se_dev_plug se_plug;
+ struct blk_plug blk_plug;
+ unsigned long flags;
+};
+
struct iblock_dev {
struct se_device dev;
unsigned char ibd_udev_path[SE_UDEV_PATH_LEN];
@@ -24,6 +33,7 @@ struct iblock_dev {
struct bio_set ibd_bio_set;
struct block_device *ibd_bd;
bool ibd_readonly;
+ struct iblock_dev_plug *ibd_plug;
} ____cacheline_aligned;
#endif /* TARGET_CORE_IBLOCK_H */