lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 10 Jul 2018 18:53:18 +0300
From:   Leon Romanovsky <leon@...nel.org>
To:     Bart Van Assche <Bart.VanAssche@....com>
Cc:     "jan.dakinevich@...tuozzo.com" <jan.dakinevich@...tuozzo.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "den@...tuozzo.com" <den@...tuozzo.com>,
        "jgg@...pe.ca" <jgg@...pe.ca>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "dledford@...hat.com" <dledford@...hat.com>,
        "khorenko@...tuozzo.com" <khorenko@...tuozzo.com>
Subject: Re: [PATCH] ib_srpt: use kvmalloc to allocate ring pointers

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.
>
>
>
>

Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ