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: <alpine.DEB.2.22.394.2110041648220.294708@gentwo.de>
Date:   Mon, 4 Oct 2021 16:56:36 +0200 (CEST)
From:   Christoph Lameter <cl@...two.de>
To:     Hyeonggon Yoo <42.hyeyoo@...il.com>
cc:     Vlastimil Babka <vbabka@...e.cz>, linux-mm@...ck.org,
        Pekka Enberg <penberg@...nel.org>,
        David Rientjes <rientjes@...gle.com>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel@...r.kernel.org
Subject: Re: Queueing is outside of SLUB nowdays

On Fri, 1 Oct 2021, Hyeonggon Yoo wrote:

> Looking at other layers, they implemented queuing layer outside of SLUB.
> See commit 795bb1c00dd ("net: bulk free infrastructure for NAPI context,
> use napi_consume_skb") for example. They made skb cache because SLUB is
> not suitable for intensive alloc/free.
>
> And because the queue is outside of slab, it can go lockless
> depending on it's context. (But it's not easy to do so in slab because
> slab is general purpose allocator.)

The queuing within in SLUB/SLAB is lockless.

> So current approach on place where slab's performance is critical
> is implementing queuing layer on top of slab.

If you have to use object specific characteristics to optimize then yes
you can optimize further. However, the slab allocators implement each
their own form of queuing that is generic.

> Then new question arising:
>     - Is that proper way to solve fundamental problem?

There is a problem?

>       - why not use SLAB if they need queuing?

SLAB is LIFO queuing whereas SLUB uses spatial considerations and queues
within a page before going outside. Slab requires disabling interrupts,
SLUB is optimized to rely on per cpu atomics and there are numerous other
differences.

>       - how does this approach work on SLAB?

SLAB has a lockless layer that is only requiring disabling interrupts. It
provides a generic queuing layer as well.

See my talk on Slab allocators awhile back.

https://www.youtube.com/watch?v=h0VMLXavx30

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ