Hi Or,

在 2015年09月24日 19:57, Or Gerlitz 写道:
On Thu, Sep 24, 2015 at 1:49 PM, Wengang Wang <[email protected]> wrote:
@@ -786,8 +787,14 @@ static int create_qp_common(struct mlx4_ib_dev *dev, 
struct ib_pd *pd,
                 if (err)
                         goto err_mtt;

-               qp->sq.wrid  = kmalloc(qp->sq.wqe_cnt * sizeof (u64), gfp);
-               qp->rq.wrid  = kmalloc(qp->rq.wqe_cnt * sizeof (u64), gfp);
+               qp->sq.wrid = kmalloc(qp->sq.wqe_cnt * sizeof(u64), gfp);
+               if (!qp->sq.wrid)
+                       qp->sq.wrid = __vmalloc(qp->sq.wqe_cnt * sizeof(u64),
+                                               gfp, PAGE_KERNEL);
On other spots of mlx4, we're using vmalloc and not __vmalloc, any
pros/cons for going that way too here?

vmalloc is just using GFP_KERNEL | __GFP_HIGHMEM, we can't pass in the flag gfp with it. We should respect orginal code which needs to pass the flag.

thanks,
wengang

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to