megaraid_sas: iouring iopoll support
Subsystems (3)
Kashyap Desai
maintainerPATCH 2/3 megaraid_sas: iouring iopoll support
Add support of iouring iopoll interface. This feature requires shared hosttag support in kernel and driver.
Driver will work in non-IRQ mode = There will not be any msix vector associated for poll_queues and h/w can still work in this mode. MegaRaid h/w is single submission queue and multiple reply queue, but using shared host tagset support it will enable simulated multiple hw queue.
Driver allocates some extra reply queues and it will be marked as poll_queue. These poll_queues will not have associated msix vectors. All the IO completion on this queue will be done from IOPOLL interface.
megaraid_sas driver having 8 poll_queues and using io_uring hiprio=1 settings, It can reach 3.2M IOPs and there is zero interrupt generated by h/w.
This feature can be enabled using module parameter poll_queues.
--- drivers/scsi/megaraid/megaraid_sas.h | 2 + drivers/scsi/megaraid/megaraid_sas_base.c | 90 ++++++++++++++++++--- drivers/scsi/megaraid/megaraid_sas_fusion.c | 43 +++++++++- drivers/scsi/megaraid/megaraid_sas_fusion.h | 3 + 4 files changed, 127 insertions(+), 11 deletions(-)
drivers/scsi/megaraid/megaraid_sas.h +2 -0
@@ -2212,6 +2212,7 @@ struct megasas_irq_context {struct irq_poll irqpoll;bool irq_poll_scheduled;bool irq_line_enable; +atomic_t in_used; };struct MR_DRV_SYSTEM_INFO {
@@ -2446,6 +2447,7 @@ struct megasas_instance {bool support_pci_lane_margining;u8 low_latency_index_start;int perf_mode; +int iopoll_q_count; };struct MR_LD_VF_MAP {
drivers/scsi/megaraid/megaraid_sas_base.c +80 -10
165 lines not on this page · raw message
drivers/scsi/megaraid/megaraid_sas_fusion.c +42 -1
100 lines not on this page · raw message
drivers/scsi/megaraid/megaraid_sas_fusion.h +3 -0
@@ -1303,6 +1303,9 @@ struct fusion_context {u8 *sense;dma_addr_t sense_phys_addr; +atomic_t busy_mq_poll[MAX_MSIX_QUEUES_FUSION ]; + +dma_addr_t reply_frames_desc_phys[MAX_MSIX_QUEUES_FUSION ];union MPI2_REPLY_DESCRIPTORS_UNION *reply_frames_desc[MAX_MSIX_QUEUES_FUSION ];struct rdpq_alloc_detail rdpq_tracker[RDPQ_MAX_CHUNK_COUNT ];
Signature · 1 line
2.18.1
kernel test robot
build botI love your patch! Perhaps something to improve:
Hi Kashyap,
I love your patch! Perhaps something to improve:
[auto build test WARNING on next-20201013]
[cannot apply to scsi/for-next mkp-scsi/for-next v5.9 v5.9-rc8 v5.9-rc7 v5.9] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Kashyap-Desai/add-io_uring-with-IOPOLL-support-in-scsi-layer/20201014-202916 base: f2fb1afc57304f9dd68c20a08270e287470af2eb config: xtensa-allyesconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/4f93510c3e695f6f22822115f6587db68fb40e5c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kashyap-Desai/add-io_uring-with-IOPOLL-support-in-scsi-layer/20201014-202916 git checkout 4f93510c3e695f6f22822115f6587db68fb40e5c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
All warnings (new ones prefixed by >>):
>> drivers/scsi/megaraid/megaraid_sas_fusion.c:3652:5: warning: no previous prototype for 'megasas_blk_mq_poll' [-Wmissing-prototypes]
3652 | int megasas_blk_mq_poll(struct Scsi_Host *shost, unsigned int queue_num)
| ^~~~~~~~~~~~~~~~~~~
vim +/megasas_blk_mq_poll +3652 drivers/scsi/megaraid/megaraid_sas_fusion.c
3651
> 3652 int megasas_blk_mq_poll(struct Scsi_Host *shost, unsigned int queue_num)
3653 {
3654
3655 struct megasas_instance *instance;
3656 int num_entries = 0;
3657 struct fusion_context *fusion;
3658
3659 instance = (struct megasas_instance *)shost->hostdata;
3660
3661 fusion = instance->ctrl_context;
3662
3663 queue_num = queue_num + instance->low_latency_index_start;
3664
3665 if (!atomic_add_unless(&fusion->busy_mq_poll[queue_num], 1, 1))
3666 return 0;
3667
3668 num_entries = complete_cmd_fusion(instance, queue_num, NULL);
3669 atomic_dec(&fusion->busy_mq_poll[queue_num]);
3670
3671 return num_entries;
3672 }
3673
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
kernel test robot
build botI love your patch! Perhaps something to improve:
Hi Kashyap,
I love your patch! Perhaps something to improve:
[auto build test WARNING on next-20201013]
[cannot apply to scsi/for-next mkp-scsi/for-next v5.9 v5.9-rc8 v5.9-rc7 v5.9] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Kashyap-Desai/add-io_uring-with-IOPOLL-support-in-scsi-layer/20201014-202916 base: f2fb1afc57304f9dd68c20a08270e287470af2eb config: x86_64-randconfig-a004-20201014 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project e7fe3c6dfede8d5781bd000741c3dea7088307a4)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/4f93510c3e695f6f22822115f6587db68fb40e5c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kashyap-Desai/add-io_uring-with-IOPOLL-support-in-scsi-layer/20201014-202916 git checkout 4f93510c3e695f6f22822115f6587db68fb40e5c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
All warnings (new ones prefixed by >>):
>> drivers/scsi/megaraid/megaraid_sas_fusion.c:3652:5: warning: no previous prototype for function 'megasas_blk_mq_poll' [-Wmissing-prototypes]
int megasas_blk_mq_poll(struct Scsi_Host *shost, unsigned int queue_num)
^ drivers/scsi/megaraid/megaraid_sas_fusion.c:3652:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int megasas_blk_mq_poll(struct Scsi_Host *shost, unsigned int queue_num)
^
static
1 warning generated.
vim +/megasas_blk_mq_poll +3652 drivers/scsi/megaraid/megaraid_sas_fusion.c
3651
> 3652 int megasas_blk_mq_poll(struct Scsi_Host *shost, unsigned int queue_num)
3653 {
3654
3655 struct megasas_instance *instance;
3656 int num_entries = 0;
3657 struct fusion_context *fusion;
3658
3659 instance = (struct megasas_instance *)shost->hostdata;
3660
3661 fusion = instance->ctrl_context;
3662
3663 queue_num = queue_num + instance->low_latency_index_start;
3664
3665 if (!atomic_add_unless(&fusion->busy_mq_poll[queue_num], 1, 1))
3666 return 0;
3667
3668 num_entries = complete_cmd_fusion(instance, queue_num, NULL);
3669 atomic_dec(&fusion->busy_mq_poll[queue_num]);
3670
3671 return num_entries;
3672 }
3673
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org