From: Hyeonggon Yoo <42.hyeyoo@gmail.com>
To: David Laight <David.Laight@aculab.com>
Cc: Vlastimil Babka <vbabka@suse.cz>,
Christoph Lameter <cl@gentwo.org>,
Matthew Wilcox <willy@infradead.org>,
Christoph Lameter <cl@gentwo.de>,
Linux Memory Management List <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Do we really need SLOB nowdays?
Date: Sat, 19 Feb 2022 11:59:41 +0000 [thread overview]
Message-ID: <YhDbrTSdSWQWFF91@ip-172-31-19-208.ap-northeast-1.compute.internal> (raw)
In-Reply-To: <7829ee15074448d5a7cec1a0e3c352d4@AcuMS.aculab.com>
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)
>
next prev parent reply other threads:[~2022-02-19 11:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-17 4:28 [RFC] More deterministic SLOB for real time embedded systems Hyeonggon Yoo
2021-10-17 13:36 ` segregated list + slab merging is much better than original SLOB Hyeonggon Yoo
2021-10-17 13:57 ` Do we really need SLOB nowdays? Hyeonggon Yoo
2021-10-17 14:39 ` Matthew Wilcox
[not found] ` <CAB=+i9Tor-tmZuB8YjATT_rv68nnF2W_TvMvyGp55AGaSyKynw@mail.gmail.com>
2021-10-25 8:17 ` Christoph Lameter
2021-10-28 10:04 ` Hyeonggon Yoo
2021-10-28 12:08 ` Matthew Wilcox
2021-10-30 6:12 ` Hyeonggon Yoo
2021-12-10 11:08 ` Hyeonggon Yoo
2021-12-10 12:06 ` Christoph Lameter
2021-12-14 17:24 ` Vlastimil Babka
2021-12-15 6:29 ` Hyeonggon Yoo
2021-12-15 10:10 ` Vlastimil Babka
2021-12-15 15:23 ` Christoph Lameter
2022-02-18 10:13 ` Hyeonggon Yoo
2022-02-18 10:37 ` Hyeonggon Yoo
2022-02-18 16:10 ` David Laight
2022-02-19 11:59 ` Hyeonggon Yoo [this message]
2021-10-25 8:15 ` Christoph Lameter
2021-10-25 8:14 ` [RFC] More deterministic SLOB for real time embedded systems Christoph Lameter
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=YhDbrTSdSWQWFF91@ip-172-31-19-208.ap-northeast-1.compute.internal \
--to=42.hyeyoo@gmail.com \
--cc=David.Laight@aculab.com \
--cc=akpm@linux-foundation.org \
--cc=cl@gentwo.de \
--cc=cl@gentwo.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.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;
as well as URLs for NNTP newsgroup(s).