Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Bart Van Assche <Bart.VanAssche@wdc.com>
Cc: "jan.dakinevich@virtuozzo.com" <jan.dakinevich@virtuozzo.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"den@virtuozzo.com" <den@virtuozzo.com>,
	"jgg@ziepe.ca" <jgg@ziepe.ca>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"dledford@redhat.com" <dledford@redhat.com>,
	"khorenko@virtuozzo.com" <khorenko@virtuozzo.com>
Subject: Re: [PATCH] ib_srpt: use kvmalloc to allocate ring pointers
Date: Tue, 10 Jul 2018 18:53:18 +0300	[thread overview]
Message-ID: <20180710155318.GI3014@mtr-leonro.mtl.com> (raw)
In-Reply-To: <5196ea6e33825dd5fde58d23b38630afafcb77f1.camel@wdc.com>

[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]

On Tue, Jul 10, 2018 at 03:08:38PM +0000, Bart Van Assche wrote:
> On Tue, 2018-07-10 at 08:39 +0300, Leon Romanovsky wrote:
> > On Mon, Jul 09, 2018 at 04:51:08PM +0300, Jan Dakinevich wrote:
> > > An array of pointers to SRPT contexts in ib_device is over 30KiB even
> > > in default case, in which an amount of contexts is 4095. The patch
> > > is intended to weed out large contigous allocation for non-DMA memory.
> >
> > kvmalloc* doesn't "weed out" large contiguous allocations, but tries to
> > allocate them and gracefully fallback to vmalloc if kmalloc fails.
> >
> > More on that, for allocations less than page (64KB for PowerPC), it will
> > not call to vmalloc at all, which is fine too, because pages granularity.
> >
> > If you want to get rid of "contiguous allocations", use vmalloc instead.
>
> vmalloc() has a very significant disadvantage compared to kvmalloc(): with
> vmalloc() it is guaranteed that memory allocations will be slow. That's not
> the case for kvmalloc() if the number of bytes that is allocated is small
> enough.

Bart,

I'm not arguing, just pointing that the commit message doesn't reflect
actual change.

Thanks

>
> Bart.
>
>
>
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

      reply	other threads:[~2018-07-10 15:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-09 13:51 [PATCH] ib_srpt: use kvmalloc to allocate ring pointers Jan Dakinevich
2018-07-09 20:56 ` Bart Van Assche
2018-07-09 22:16 ` Jason Gunthorpe
2018-07-10  5:39 ` Leon Romanovsky
2018-07-10 15:08   ` Bart Van Assche
2018-07-10 15:53     ` Leon Romanovsky [this message]

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=20180710155318.GI3014@mtr-leonro.mtl.com \
    --to=leon@kernel.org \
    --cc=Bart.VanAssche@wdc.com \
    --cc=den@virtuozzo.com \
    --cc=dledford@redhat.com \
    --cc=jan.dakinevich@virtuozzo.com \
    --cc=jgg@ziepe.ca \
    --cc=khorenko@virtuozzo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox