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:   Sat, 19 Feb 2022 11:59:41 +0000
From:   Hyeonggon Yoo <42.hyeyoo@...il.com>
To:     David Laight <David.Laight@...lab.com>
Cc:     Vlastimil Babka <vbabka@...e.cz>,
        Christoph Lameter <cl@...two.org>,
        Matthew Wilcox <willy@...radead.org>,
        Christoph Lameter <cl@...two.de>,
        Linux Memory Management List <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Pekka Enberg <penberg@...nel.org>,
        David Rientjes <rientjes@...gle.com>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: Do we really need SLOB nowdays?

On Fri, Feb 18, 2022 at 04:10:28PM +0000, David Laight wrote:
> From: Hyeonggon Yoo
> > Sent: 18 February 2022 10:13
> ...
> > I think SLUB can be memory-efficient as SLOB.
> > Is SLOB (Address-Ordered next^Wfirst fit) stronger to fragmentation than SLUB?
> 
> Dunno, but I had to patch the vxworks malloc to use 'best fit'
> because 'first fit' based on a fifo free list was really horrid.
> 
> I can't imagine an address ordered 'first fit' really being that much better.
> 
> There are probably a lot more allocs and frees than the kernel used to have.
> 
> Also isn't the performance of a 'first fit' going to get horrid
> when there are a lot of small items on the free list.

SLOB is focused on low memory usage, at the cost of poor performance.
Its speed is not a concern.

I think Address-Ordered sequential fit method pretty well in terms of
low memory usage.

And I think SLUB may replace SLOB, but we need to sure SLUB is
absolute winner.. I wonder How slab maintainers think?

> 
> Does SLUB split pages into 3s and 5s (on cache lime boundaries)
> as well as powers of 2?
>

SLUB/SLAB use different strategy than SLOB, for better allocation
performance. It's variant of segregated storage method.

SLUB/SLAB both creates dedicated "caches" for each type of object. for
example, on my system, there are slab cache for dentry(192), filp(256),
fs_cache(64) ... etc.

Objects that has different types are by default managed by different cache,
which holds manages of pages. slab caches can be merged for better cacheline
utilization.

SLUB/SLAB also creates global kmalloc caches at boot time for power of 2
objects and (128, 256, 512, 1K, 2K, 4K, 8K on my system).

Thanks,
Hyeonggon.

> 	David
> 
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ