summaryrefslogtreecommitdiffstats
path: root/net/rds/ib_cm.c
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2010-04-23 19:49:53 +0200
committerAndy Grover <andy.grover@oracle.com>2010-09-09 03:14:06 +0200
commite4c52c98e04937ea87b0979a81354d0040d284f9 (patch)
treec7bfbd9d952ebb66e7491d7c3a1bc91db3fbfbb8 /net/rds/ib_cm.c
parentRDS/IB: Remove unused variable in ib_remove_addr() (diff)
downloadlinux-e4c52c98e04937ea87b0979a81354d0040d284f9.tar.xz
linux-e4c52c98e04937ea87b0979a81354d0040d284f9.zip
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.c6
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)
goto out;
}
- ic->i_sends = vmalloc(ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work));
+ ic->i_sends = vmalloc_node(ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work),
+ ibdev_to_node(dev));
if (!ic->i_sends) {
ret = -ENOMEM;
rdsdebug("send allocation failed\n");
@@ -355,7 +356,8 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
}
memset(ic->i_sends, 0, ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work));
- ic->i_recvs = vmalloc(ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work));
+ ic->i_recvs = vmalloc_node(ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work),
+ ibdev_to_node(dev));
if (!ic->i_recvs) {
ret = -ENOMEM;
rdsdebug("recv allocation failed\n");