aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw
diff options
context:
space:
mode:
authorJubin John <jubin.john@intel.com>2016-05-19 05:21:31 -0700
committerDoug Ledford <dledford@redhat.com>2016-05-26 11:23:10 -0400
commit49961f8fe8264fa231fbdcc4ca52c6706fdb2577 (patch)
tree0dbed9e88435942df41e77155409441e70d9252c /drivers/infiniband/sw
parentIB/rdmavt: Insure QP vmalloc variants zero memory (diff)
downloadlinux-dev-49961f8fe8264fa231fbdcc4ca52c6706fdb2577.tar.xz
linux-dev-49961f8fe8264fa231fbdcc4ca52c6706fdb2577.zip
IB/rdmavt: Use kzalloc_node
Use kzalloc_node instead of kzalloc for rdmavt memory region segment allocation to optimize for performance on NUMA platforms. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Jubin John <jubin.john@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw')
-rw-r--r--drivers/infiniband/sw/rdmavt/mr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rdmavt/mr.c b/drivers/infiniband/sw/rdmavt/mr.c
index 0ff765bfd619..0f4d4500f45e 100644
--- a/drivers/infiniband/sw/rdmavt/mr.c
+++ b/drivers/infiniband/sw/rdmavt/mr.c
@@ -124,11 +124,13 @@ static int rvt_init_mregion(struct rvt_mregion *mr, struct ib_pd *pd,
int count)
{
int m, i = 0;
+ struct rvt_dev_info *dev = ib_to_rvt(pd->device);
mr->mapsz = 0;
m = (count + RVT_SEGSZ - 1) / RVT_SEGSZ;
for (; i < m; i++) {
- mr->map[i] = kzalloc(sizeof(*mr->map[0]), GFP_KERNEL);
+ mr->map[i] = kzalloc_node(sizeof(*mr->map[0]), GFP_KERNEL,
+ dev->dparms.node);
if (!mr->map[i]) {
rvt_deinit_mregion(mr);
return -ENOMEM;