aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/ib_rdma.c
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2010-04-23 13:49:53 -0400
committerAndy Grover <andy.grover@oracle.com>2010-09-08 21:14:06 -0400
commite4c52c98e04937ea87b0979a81354d0040d284f9 (patch)
treec7bfbd9d952ebb66e7491d7c3a1bc91db3fbfbb8 /net/rds/ib_rdma.c
parent4a81802b5e5e0b059627d7173c917711cf35e668 (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_rdma.c')
-rw-r--r--net/rds/ib_rdma.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c
index 7315fffd3bc8..cc341cd70c87 100644
--- a/net/rds/ib_rdma.c
+++ b/net/rds/ib_rdma.c
@@ -297,7 +297,7 @@ static struct rds_ib_mr *rds_ib_alloc_fmr(struct rds_ib_device *rds_ibdev)
297 rds_ib_flush_mr_pool(pool, 0); 297 rds_ib_flush_mr_pool(pool, 0);
298 } 298 }
299 299
300 ibmr = kzalloc(sizeof(*ibmr), GFP_KERNEL); 300 ibmr = kzalloc_node(sizeof(*ibmr), GFP_KERNEL, rdsibdev_to_node(rds_ibdev));
301 if (!ibmr) { 301 if (!ibmr) {
302 err = -ENOMEM; 302 err = -ENOMEM;
303 goto out_no_cigar; 303 goto out_no_cigar;
@@ -376,7 +376,8 @@ static int rds_ib_map_fmr(struct rds_ib_device *rds_ibdev, struct rds_ib_mr *ibm
376 if (page_cnt > fmr_message_size) 376 if (page_cnt > fmr_message_size)
377 return -EINVAL; 377 return -EINVAL;
378 378
379 dma_pages = kmalloc(sizeof(u64) * page_cnt, GFP_ATOMIC); 379 dma_pages = kmalloc_node(sizeof(u64) * page_cnt, GFP_ATOMIC,
380 rdsibdev_to_node(rds_ibdev));
380 if (!dma_pages) 381 if (!dma_pages)
381 return -ENOMEM; 382 return -ENOMEM;
382 383