linux_dsm_epyc7002/drivers/infiniband/hw/hfi1
Sebastian Sanchez b094a36f90 IB/hfi1: Refine user process affinity algorithm
When performing process affinity recommendations for MPI ranks, the current
algorithm doesn't take into account multiple HFI units. Also, real
cores and HT cores are not distinguished from one another. Therefore,
all HT cores are recommended to be assigned first within the local NUMA
node before recommending the assignments of cores in other NUMA nodes.
It's ideal to assign all real cores across all NUMA nodes first, then all
HT 1 cores, then all HT 2 cores, and so on to balance CPU workload. CPU
cores in other NUMA nodes could be running interrupt handlers, and this is
not taken into account.

To balance the CPU workload for user processes, the following
recommendation algorithm is used:

 For each user process that is opening a context on HFI Y:
  a) If all cores are assigned to user processes, start assignments all
	 over from the first core
  b) Assign real cores first, then HT cores (First set of HT cores on
	 all physical cores, then second set of HT cores, and, so on) in the
	 following order:

	 1. Same NUMA node as HFI Y and not running an IRQ handler
	 2. Same NUMA node as HFI Y and running an IRQ handler
	 3. Different NUMA node to HFI Y and not running an IRQ handler
	 4. Different NUMA node to HFI Y and running an IRQ handler
  c) Mark core as assigned in the global affinity structure. As user
	 processes are done, remove core assignments from global affinity
	 structure.

This implementation allows an arbitrary number of HT cores and provides
support for multiple HFIs.

This is being included in the kernel rather than user space due to the
fact that user space has no way of knowing the CPU recommendations for
contexts running as part of other jobs.

Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2016-08-02 15:47:33 -04:00
..
affinity.c IB/hfi1: Refine user process affinity algorithm 2016-08-02 15:47:33 -04:00
affinity.h IB/hfi1: Refine user process affinity algorithm 2016-08-02 15:47:33 -04:00
aspm.h
chip_registers.h
chip.c IB/hfi1: Add global structure for affinity assignments 2016-08-02 15:45:14 -04:00
chip.h IB/hfi1: Correct 8051 link parameter settings 2016-05-26 12:21:10 -04:00
common.h
debugfs.c
debugfs.h
device.c
device.h
dma.c
driver.c IB/hfi1: Add counter to track unsupported packets drop 2016-08-02 12:00:54 -04:00
efivar.c
efivar.h
eprom.c
eprom.h
file_ops.c IB/hfi1: Refine user process affinity algorithm 2016-08-02 15:47:33 -04:00
firmware.c
hfi.h IB/hfi1: Reserve and collapse CPU cores for contexts 2016-08-02 15:47:07 -04:00
init.c IB/hfi1: Reserve and collapse CPU cores for contexts 2016-08-02 15:47:07 -04:00
intr.c
iowait.h
Kconfig
mad.c IB/hfi1: Add counter to track unsupported packets drop 2016-08-02 12:00:54 -04:00
mad.h IB/hfi1: Clean up port state structure definition 2016-08-02 12:00:54 -04:00
Makefile
mmu_rb.c
mmu_rb.h
opa_compat.h
pcie.c
pio_copy.c
pio.c IB/hfi1: Increase packet egress timeout 2016-06-17 20:11:26 -04:00
pio.h
platform.c IB/hfi1: Correct 8051 link parameter settings 2016-05-26 12:21:10 -04:00
platform.h
qp.c IB/hfi1: Fix hard lockup due to not using save/restore spin lock 2016-05-26 12:21:10 -04:00
qp.h
qsfp.c IB/hfi1: Fix typo 2016-08-02 12:00:54 -04:00
qsfp.h
rc.c IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
ruc.c
sdma_txreq.h
sdma.c
sdma.h
sysfs.c
trace_ctxts.h IB/hfi1: Fix trace sparse errors 2016-08-02 12:00:54 -04:00
trace_dbg.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
trace_ibhdrs.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
trace_misc.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
trace_rc.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
trace_rx.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
trace_tx.h IB/hfi1: Fix trace sparse errors 2016-08-02 12:00:54 -04:00
trace.c IB/hfi1: Suppress sparse warnings 2016-06-06 19:37:23 -04:00
trace.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
twsi.c
twsi.h
uc.c
ud.c IB/hfi1: Correct issues with sc5 computation 2016-07-12 10:46:24 -04:00
user_exp_rcv.c
user_exp_rcv.h
user_pages.c
user_sdma.c IB/hfi1: Suppress sparse warnings 2016-06-06 19:37:23 -04:00
user_sdma.h
verbs_txreq.c IB/hfi1: Fix deadlock with txreq allocation slow path 2016-06-23 10:16:15 -04:00
verbs_txreq.h IB/hfi1: Fix deadlock with txreq allocation slow path 2016-06-23 10:16:15 -04:00
verbs.c IB/hfi1: Add tracing support for send with invalidate opcode 2016-05-26 12:21:10 -04:00
verbs.h