summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/hfi1/affinity.h
diff options
context:
space:
mode:
authorSebastian Sanchez <sebastian.sanchez@intel.com>2016-07-25 07:54:48 -0700
committerDoug Ledford <dledford@redhat.com>2016-08-02 15:47:07 -0400
commitd63730192f5914c0f6feec3d45116486be1d36e3 (patch)
tree3a886c96fe7e2c3ab51840671bf3b7981944ac07 /drivers/infiniband/hw/hfi1/affinity.h
parent4197344ba5c2aab24b96f141cb00af9d0471f60b (diff)
IB/hfi1: Reserve and collapse CPU cores for contexts
Kernel receive queues oversubscribe CPU cores on multi-HFI systems. To prevent this, the kernel receive queues are separated onto different cores, and the SDMA engine interrupts are constrained to a lesser number of cores. hfi1s_on_numa_node*krcvqs is the number of CPU cores that are reserved for kernel receive queues for all HFIs. Each HFI initializes its kernel receive queues to one of the reserved CPU cores. If there ends up being 0 CPU cores leftover for SDMA engines, use the same CPU cores as receive contexts. In addition, general and control contexts are assigned to their own CPU core, however, both types of contexts tend to have low traffic. To save CPU cores, collapse general and control contexts to one CPU core for all HFI units. This change prevents SDMA engine interrupts from wrapping around general contexts. Reviewed-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/affinity.h')
-rw-r--r--drivers/infiniband/hw/hfi1/affinity.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hfi1/affinity.h b/drivers/infiniband/hw/hfi1/affinity.h
index ad3e730a8d8f..003860ed0d25 100644
--- a/drivers/infiniband/hw/hfi1/affinity.h
+++ b/drivers/infiniband/hw/hfi1/affinity.h
@@ -107,6 +107,7 @@ struct hfi1_affinity_node {
int node;
struct cpu_mask_set def_intr;
struct cpu_mask_set rcv_intr;
+ struct cpumask general_intr_mask;
struct list_head list;
};
@@ -118,7 +119,7 @@ struct hfi1_affinity_node_list {
spinlock_t lock;
};
-void node_affinity_init(void);
+int node_affinity_init(void);
void node_affinity_destroy(void);
extern struct hfi1_affinity_node_list node_affinity;