summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/qib/qib_file_ops.c
diff options
context:
space:
mode:
authorRamkrishna Vepa <ramkrishna.vepa@intel.com>2013-05-28 12:57:33 -0400
committerRoland Dreier <roland@purestorage.com>2013-06-21 17:19:48 -0700
commite0f30baca1ebe5547f6760f760b8c4e189fc1203 (patch)
tree5b5b8858c292da3138f1ab8535872005f06f3e50 /drivers/infiniband/hw/qib/qib_file_ops.c
parentab4a13d69bf01b098906c60e7598d10752401a56 (diff)
downloadtalos-op-linux-e0f30baca1ebe5547f6760f760b8c4e189fc1203.tar.gz
talos-op-linux-e0f30baca1ebe5547f6760f760b8c4e189fc1203.zip
IB/qib: Add optional NUMA affinity
This patch adds context relative numa affinity conditioned on the module parameter numa_aware. The qib_ctxtdata has an additional node_id member and qib_create_ctxtdata() has an addition node_id parameter. The allocations within the hdr queue and eager queue setup routines now take this additional member and adjust allocations as necesary. PSM will pass the either current numa node or the node closest to the HCA depending on numa_aware. Verbs will always use the node closest to the HCA. Reviewed-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Ramkrishna Vepa <ramkrishna.vepa@intel.com> Signed-off-by: Vinit Agnihotri <vinit.abhay.agnihotri@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_file_ops.c')
-rw-r--r--drivers/infiniband/hw/qib/qib_file_ops.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/qib/qib_file_ops.c b/drivers/infiniband/hw/qib/qib_file_ops.c
index b56c9428f3c5..65b2fc3f957c 100644
--- a/drivers/infiniband/hw/qib/qib_file_ops.c
+++ b/drivers/infiniband/hw/qib/qib_file_ops.c
@@ -1263,8 +1263,12 @@ static int setup_ctxt(struct qib_pportdata *ppd, int ctxt,
struct qib_ctxtdata *rcd;
void *ptmp = NULL;
int ret;
+ int numa_id;
- rcd = qib_create_ctxtdata(ppd, ctxt);
+ numa_id = qib_numa_aware ? numa_node_id() :
+ dd->assigned_node_id;
+
+ rcd = qib_create_ctxtdata(ppd, ctxt, numa_id);
/*
* Allocate memory for use in qib_tid_update() at open to
OpenPOWER on IntegriCloud