WSL2-Linux-Kernel/drivers/infiniband/hw/qib
Sebastian Sanchez 5d18ee67d4 IB/{hfi1, rdmavt, qib}: Implement CQ completion vector support
Currently the driver doesn't support completion vectors. These
are used to indicate which sets of CQs should be grouped together
into the same vector. A vector is a CQ processing thread that
runs on a specific CPU.

If an application has several CQs bound to different completion
vectors, and each completion vector runs on different CPUs, then
the completion queue workload is balanced. This helps scale as more
nodes are used.

Implement CQ completion vector support using a global workqueue
where a CQ entry is queued to the CPU corresponding to the CQ's
completion vector. Since the workqueue is global, it's guaranteed
to always be there when queueing CQ entries; Therefore, the RCU
locking for cq->rdi->worker in the hot path is superfluous.

Each completion vector is assigned to a different CPU. The number of
completion vectors available is computed by taking the number of
online, physical CPUs from the local NUMA node and subtracting the
CPUs used for kernel receive queues and the general interrupt.
Special use cases:

  * If there are no CPUs left for completion vectors, the same CPU
    for the general interrupt is used; Therefore, there would only
    be one completion vector available.

  * For multi-HFI systems, the number of completion vectors available
    for each device is the total number of completion vectors in
    the local NUMA node divided by the number of devices in the same
    NUMA node. If there's a division remainder, the first device to
    get initialized gets an extra completion vector.

Upon a CQ creation, an invalid completion vector could be specified.
Handle it as follows:

  * If the completion vector is less than 0, set it to 0.

  * Set the completion vector to the result of the passed completion
    vector moded with the number of device completion vectors
    available.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2018-05-09 15:53:30 -04:00
..
Kconfig IB: Move PCI dependency from root KConfig to HW's KConfigs 2017-09-27 08:54:19 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
qib.h IB/{hfi1, qib}: Add handling of kernel restart 2018-05-09 15:53:29 -04:00
qib_6120_regs.h IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters 2010-05-23 21:44:54 -07:00
qib_7220.h Merge branch 'timer_setup' into for-next 2017-10-18 13:12:09 -04:00
qib_7220_regs.h IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters 2010-05-23 21:44:54 -07:00
qib_7322_regs.h IB/qib: Mask hardware error during link reset 2010-07-06 14:13:20 -07:00
qib_common.h IB/hfi1, qib, rdmavt: Move AETH credit functions into rdmavt 2017-02-19 09:18:38 -05:00
qib_debugfs.c IB/qib: Convert qp_stats debugfs interface to use new iterator API 2017-08-28 19:12:30 -04:00
qib_debugfs.h IB/qib: Convert opcode counters to per-context 2013-06-21 17:19:50 -07:00
qib_diag.c RDMA: Use u64_to_user_ptr everywhere 2018-03-29 13:42:29 -06:00
qib_driver.c IB/{hfi1, qib}: Fix a concurrency issue with device name in logging 2018-01-05 13:34:55 -05:00
qib_eeprom.c IB/{hfi1, qib}: Fix a concurrency issue with device name in logging 2018-01-05 13:34:55 -05:00
qib_file_ops.c infiniband: hw: qib: Change return type to vm_fault_t 2018-04-27 12:10:11 -04:00
qib_fs.c fs: constify tree_descr arrays passed to simple_fill_super() 2017-04-26 23:54:06 -04:00
qib_iba6120.c Merge branch 'timer_setup' into for-next 2017-10-18 13:12:09 -04:00
qib_iba7220.c Merge branch 'timer_setup' into for-next 2017-10-18 13:12:09 -04:00
qib_iba7322.c IB/qib: Move char *qib_sdma_state_names[] and constify while there. 2018-02-28 13:57:40 -07:00
qib_init.c IB/{hfi1, qib}: Add handling of kernel restart 2018-05-09 15:53:29 -04:00
qib_intr.c IB/qib: Convert timers to use timer_setup() 2017-10-09 12:19:41 -04:00
qib_mad.c Merge branch 'timer_setup' into for-next 2017-10-18 13:12:09 -04:00
qib_mad.h IB/core: Add core header changes needed for OPA 2015-08-28 22:54:50 -04:00
qib_pcie.c IB/qib: Remove set-but-not-used variables 2017-10-14 20:47:07 -04:00
qib_pio_copy.c IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters 2010-05-23 21:44:54 -07:00
qib_qp.c IB/qib: Convert qp_stats debugfs interface to use new iterator API 2017-08-28 19:12:30 -04:00
qib_qsfp.c IB/qib: Remove empty function 2017-01-24 16:20:37 -05:00
qib_qsfp.h IB/qib: Remove empty function 2017-01-24 16:20:37 -05:00
qib_rc.c Second pull request for 4.16 merge window 2018-02-06 11:09:45 -08:00
qib_ruc.c drivers/infiniband: Remove now-redundant smp_read_barrier_depends() 2017-12-05 11:56:54 -08:00
qib_sd7220.c Merge branch 'timer_setup' into for-next 2017-10-18 13:12:09 -04:00
qib_sdma.c IB/qib: Move char *qib_sdma_state_names[] and constify while there. 2018-02-28 13:57:40 -07:00
qib_sysfs.c IB/qib: add const to bin_attribute structures 2017-08-18 14:06:09 -04:00
qib_twsi.c IB/qib: Add blank line after declaration 2015-02-20 09:04:12 -08:00
qib_tx.c Merge branch 'timer_setup' into for-next 2017-10-18 13:12:09 -04:00
qib_uc.c Second pull request for 4.16 merge window 2018-02-06 11:09:45 -08:00
qib_ud.c Second pull request for 4.16 merge window 2018-02-06 11:09:45 -08:00
qib_user_pages.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h> 2017-03-02 08:42:29 +01:00
qib_user_sdma.c RDMA/qib: use rb_entry() 2017-01-12 11:38:41 -05:00
qib_user_sdma.h IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters 2010-05-23 21:44:54 -07:00
qib_verbs.c IB/{hfi1, rdmavt, qib}: Implement CQ completion vector support 2018-05-09 15:53:30 -04:00
qib_verbs.h IB/qib: Convert qp_stats debugfs interface to use new iterator API 2017-08-28 19:12:30 -04:00
qib_wc_ppc64.c IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters 2010-05-23 21:44:54 -07:00
qib_wc_x86_64.c IB/qib: fix test of unsigned variable 2015-05-12 13:55:41 -04:00