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] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yg9xSWEaTZLA+hYt@ip-172-31-19-208.ap-northeast-1.compute.internal>
Date:   Fri, 18 Feb 2022 10:13:29 +0000
From:   Hyeonggon Yoo <42.hyeyoo@...il.com>
To:     Vlastimil Babka <vbabka@...e.cz>
Cc:     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 Wed, Dec 15, 2021 at 11:10:06AM +0100, Vlastimil Babka wrote:
> On 12/15/21 07:29, Hyeonggon Yoo wrote:
> > On Tue, Dec 14, 2021 at 06:24:58PM +0100, Vlastimil Babka wrote:
> >> On 12/10/21 13:06, Christoph Lameter wrote:
> >> > On Fri, 10 Dec 2021, Hyeonggon Yoo wrote:
> >> > 
> >> >> > > (But I still have doubt if we can run linux on machines like that.)
> >> >> >
> >> >> > I sent you a series of articles about making Linux run in 1MB.
> >> >>
> >> >> After some time playing with the size of kernel,
> >> >> I was able to run linux in 6.6MiB of RAM. and the SLOB used
> >> >> around 300KiB of memory.
> >> > 
> >> > What is the minimal size you need for SLUB?
> >>  
> > 
> > I don't know why Christoph's mail is not in my mailbox. maybe I deleted it
> > by mistake or I'm not cc-ed.
> > 
> > Anyway, I tried to measure this again with SLUB and SLOB.
> > 
> > SLUB uses few hundreds of bytes than SLOB.
> > 
> > There isn't much difference in 'Memory required to boot'.
> > (interestingly SLUB requires less)
> > 
> > 'Memory required to boot' is measured by reducing memory
> > until it says 'System is deadlocked on memory'. I don't know
> > exact reason why they differ.
> > 
> > Note that the configuration is based on tinyconfig and
> > I added initramfs support + tty layer (+ uart driver) + procfs support,
> > + ELF binary support + etc.
> > 
> > there isn't even block layer, but it's good starting point to see
> > what happens in small system.
> > 
> > SLOB:
> > 
> > 	Memory required to boot: 6950K
> > 
> > 		Slab:                368 kB
> > 
> > SLUB:
> > 	Memory required to boot: 6800K
> > 
> > 		Slab:                552 kB
> > 
> > SLUB with slab merging:
> > 
> > 		Slab:                536 kB
> 
> 168kB different on a system with less than 8MB memory looks rather
> significant to me to simply delete SLOB, I'm afraid.

Just FYI...
Some experiment based on v5.17-rc3:

SLOB:
	Slab:                388 kB

SLUB:
	Slab:                540 kB (+152kb)

SLUB with s->min_partial = 0:
	Slab:                452 kB (+64kb)

SLUB with s->min_partial = 0 && slub_max_order = 0:
	Slab:                436 kB (+48kb)

SLUB with s->min_partial = 0 && slub_max_order = 0
+ merging slabs crazily (just ignore SLAB_NEVER_MERGE/SLAB_MERGE_SAME):
	Slab:                408 kB (+20kb)

Decreasing further seem to be hard and
I guess +20kb are due to partial slabs.

I think SLUB can be memory-efficient as SLOB.
Is SLOB (Address-Ordered next fit) stronger to fragmentation than SLUB?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ