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: <20160825073207.GE4230@dhcp22.suse.cz>
Date:   Thu, 25 Aug 2016 09:32:07 +0200
From:   Michal Hocko <mhocko@...nel.org>
To:     Christoph Lameter <cl@...ux.com>
Cc:     Andi Kleen <andi@...stfloor.org>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Aruna Ramakrishna <aruna.ramakrishna@...cle.com>,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Mike Kravetz <mike.kravetz@...cle.com>,
        Pekka Enberg <penberg@...nel.org>,
        David Rientjes <rientjes@...gle.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Mel Gorman <mgorman@...e.de>, Jiri Slaby <jslaby@...e.cz>
Subject: Re: what is the purpose of SLAB and SLUB

On Wed 24-08-16 23:10:03, Christoph Lameter wrote:
> On Tue, 23 Aug 2016, Andi Kleen wrote:
> 
> > Why would you stop someone from working on SLAB if they want to?
> >
> > Forcibly enforcing a freeze on something can make sense if you're
> > in charge of a team to conserve resources, but in Linux the situation is
> > very different.
> 
> I agree and frankly having multiple allocators is something good.
> Features that are good in one are copied to the other and enhanced in the
> process. I think this has driven code development quite a bit.
> 
> Every allocator has a different basic approach to storage layout and
> synchronization which determines performance in various usage scenarios.
> The competition of seeing if the developer that is a fan of one can come
> up with a way to make performance better or storage use more effective in
> a situation where another shows better numbers is good.

I can completely see how having multiple allocators (schedulers etc...)
can be good as a playground. But how are users supposed to chose when
we do not help them with any documentation. Most benchmarks which are
referred to (e.g. SLUB doesn't work so well with the networking
workloads) might be really outdated and that just feeds the cargo cult.
Look, I am not suggesting removing SLAB (or SLUB) I am just really
looking to understand for their objectives and which users they target. 
Because as of now, most users are using whatever is the default (SLUB
for some and never documented reason) or what their distributions come
up with. This means that we have quite a lot of code which only few
people understand deeply. Some features which are added on top need much
more testing to cover both allocators or we are risking subtle
regressions.

> There may be more creative ways of coming up with new ways of laying out
> storage in the future and I would like to have the flexibility in the
> kernel to explore those if necessary with additional variations.

Flexibility is always good but there comes a maintenance burden. Both
should be weighed properly.

> The more common code we can isolate the easier it will become to just try
> out a new layout and a new form of serialization to see if it provides
> advantages.

Sure, but even after attempts to make some code common we are still at
$ wc -l mm/slab.c mm/slub.c 
	4479 mm/slab.c
	5727 mm/slub.c
	10206 total

quite a lot, don't you think?

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ