All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wengang Wang <wen.gang.wang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Or Gerlitz <gerlitz.or-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] IB/mlx4: Use vmalloc for WR buffers when needed
Date: Fri, 25 Sep 2015 08:51:22 +0800	[thread overview]
Message-ID: <56049A8A.6040101@oracle.com> (raw)
In-Reply-To: <CAJ3xEMgN4_gk4_hVXOW2GhcfnXxgPnm=Lrc7JwkxBAeKv4KRAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi Or,

在 2015年09月24日 19:57, Or Gerlitz 写道:
> On Thu, Sep 24, 2015 at 1:49 PM, Wengang Wang <wen.gang.wang@oracle.com> 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-09-25  0:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-24 10:49 [PATCH] IB/mlx4: Use vmalloc for WR buffers when needed Wengang Wang
     [not found] ` <1443091747-13881-1-git-send-email-wen.gang.wang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-09-24 11:57   ` Or Gerlitz
     [not found]     ` <CAJ3xEMgN4_gk4_hVXOW2GhcfnXxgPnm=Lrc7JwkxBAeKv4KRAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-25  0:51       ` Wengang Wang [this message]
     [not found]         ` <56049A8A.6040101-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-10-08  6:06           ` Leon Romanovsky
     [not found]             ` <20151008060609.GA19101-2ukJVAZIZ/Y@public.gmane.org>
2015-10-08  6:14               ` Or Gerlitz
     [not found]                 ` <561609D9.2080404-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-10-08  6:25                   ` Leon Romanovsky
2015-10-08  5:10   ` Or Gerlitz
  -- strict thread matches above, loose matches on Subject: below --
2015-09-24  6:52 Wengang Wang
     [not found] ` <1443077547-12246-1-git-send-email-wen.gang.wang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-09-24  8:07   ` Or Gerlitz
     [not found]     ` <5603AF26.9040403-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-09-24 10:46       ` Wengang Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56049A8A.6040101@oracle.com \
    --to=wen.gang.wang-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=gerlitz.or-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.