diff options
author | Mitko Haralanov <mitko.haralanov@intel.com> | 2016-02-03 22:33:58 (GMT) |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-11 01:37:52 (GMT) |
commit | 377f111ee81bcef1a788a396f6d813a6b966acbb (patch) | |
tree | 53105d8d5317a91aef2067973822b13855603e0c /drivers/staging/rdma/hfi1/init.c | |
parent | cc57236f5515cd343fa47e9664090b54bdb410a3 (diff) | |
download | linux-377f111ee81bcef1a788a396f6d813a6b966acbb.tar.xz |
staging/rdma/hfi1: Verbs Mem affinity support
Change verbs memory allocations to the device numa node. This keeps memory
close to the device for optimal performance.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/staging/rdma/hfi1/init.c')
-rw-r--r-- | drivers/staging/rdma/hfi1/init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/rdma/hfi1/init.c b/drivers/staging/rdma/hfi1/init.c index 98b3fc1..629e92a 100644 --- a/drivers/staging/rdma/hfi1/init.c +++ b/drivers/staging/rdma/hfi1/init.c @@ -134,7 +134,8 @@ int hfi1_create_ctxts(struct hfi1_devdata *dd) /* Control context has to be always 0 */ BUILD_BUG_ON(HFI1_CTRL_CTXT != 0); - dd->rcd = kcalloc(dd->num_rcv_contexts, sizeof(*dd->rcd), GFP_KERNEL); + dd->rcd = kzalloc_node(dd->num_rcv_contexts * sizeof(*dd->rcd), + GFP_KERNEL, dd->node); if (!dd->rcd) goto nomem; |