diff options
author | Andy Grover <andy.grover@oracle.com> | 2010-04-23 13:49:53 -0400 |
---|---|---|
committer | Andy Grover <andy.grover@oracle.com> | 2010-09-08 21:14:06 -0400 |
commit | e4c52c98e04937ea87b0979a81354d0040d284f9 (patch) | |
tree | c7bfbd9d952ebb66e7491d7c3a1bc91db3fbfbb8 /net/rds/ib_cm.c | |
parent | 4a81802b5e5e0b059627d7173c917711cf35e668 (diff) |
RDS/IB: add _to_node() macros for numa and use {k,v}malloc_node()
Allocate send/recv rings in memory that is node-local to the HCA.
This significantly helps performance.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Diffstat (limited to 'net/rds/ib_cm.c')
-rw-r--r-- | net/rds/ib_cm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c index 75eda9c82135..b5d0b60a26bc 100644 --- a/net/rds/ib_cm.c +++ b/net/rds/ib_cm.c | |||
@@ -347,7 +347,8 @@ static int rds_ib_setup_qp(struct rds_connection *conn) | |||
347 | goto out; | 347 | goto out; |
348 | } | 348 | } |
349 | 349 | ||
350 | ic->i_sends = vmalloc(ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work)); | 350 | ic->i_sends = vmalloc_node(ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work), |
351 | ibdev_to_node(dev)); | ||
351 | if (!ic->i_sends) { | 352 | if (!ic->i_sends) { |
352 | ret = -ENOMEM; | 353 | ret = -ENOMEM; |
353 | rdsdebug("send allocation failed\n"); | 354 | rdsdebug("send allocation failed\n"); |
@@ -355,7 +356,8 @@ static int rds_ib_setup_qp(struct rds_connection *conn) | |||
355 | } | 356 | } |
356 | memset(ic->i_sends, 0, ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work)); | 357 | memset(ic->i_sends, 0, ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work)); |
357 | 358 | ||
358 | ic->i_recvs = vmalloc(ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work)); | 359 | ic->i_recvs = vmalloc_node(ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work), |
360 | ibdev_to_node(dev)); | ||
359 | if (!ic->i_recvs) { | 361 | if (!ic->i_recvs) { |
360 | ret = -ENOMEM; | 362 | ret = -ENOMEM; |
361 | rdsdebug("recv allocation failed\n"); | 363 | rdsdebug("recv allocation failed\n"); |