kernel memory accounting
I'm currently working on the new cgroup slab controller [1], which fundamentally changes how the slab memory is tracked: instead of creating a separate set of kmem_caches for each memory cgroup a single global set is used for all non-root allocations. Memcg ownership is then tracked per-object rather than per-page.
The new approach comes with a much better slab utilization and allows to reduce the slab memory size by up to ~40%.
It's also creates a foundation for tracking other objects which aren't page-sized: e.g. percpu allocations, which are scattered over multiple pages.
I'd like to share latest results and discuss all ongoing questions, concerns and suggestions.