|
|
Log in / Subscribe / Register

The first half of the 6.8 merge window

The first half of the 6.8 merge window

Posted Jan 15, 2024 12:35 UTC (Mon) by farnz (subscriber, #17727)
In reply to: The first half of the 6.8 merge window by jd
Parent article: The first half of the 6.8 merge window

There's a pattern that I've seen, more than once, in software, that the removal of SLAB and SLOB allocators to leave just SLUB fits.

First, you need a hard problem where there's no obvious solution without compromising on at least one "performance" axis; be that memory consumed, CPU time taken, complexity of understanding the solution, whatever. You need it to be hard, because otherwise people will find the optimum solution quickly.

Second, you need a solution to the problem that's a local optimum; in other words, if you exclude certain cases (such as low memory systems), this solution is optimal, and it looks like it's impossible to make it work for those cases. SLAB met this.

Third, someone needs to come forwards with a second solution to the problem that falls into a different local optimum, and is better than the previous solution for some cases, but worse for others. This gives you two ways to solve the problem - e.g. SLOB for low memory systems, SLAB for big systems - depending on your use case, and leaves most people content.

With all of the above in place, sooner or later someone will come along who's able to learn from both existing solutions and provide one that can be made equal to or better than the best of both existing solutions on all axes you care about. And once you have that solution, you might as well use it for every case that the old solutions were used for.

Note, too, that in this case, you end up not needing the old solutions (e.g. SLOB, SLAB) at all, because the new solution has now been optimized to the point where it's always the right choice. Nothing of significant value has been lost by scrapping the old solutions, because the new solution beats the old solution in every respect (bar backwards compatibility with something that assumes details about the old solution that weren't set in stone to begin with - e.g. something assuming that it can inline a hand-written free method for a SLAB-allocated object "knowing" how SLAB's data structures are laid out).


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds