]> Gentwo Git Trees - linux/.git/commit
SLUB: Add support for per object memory policies sent/20240819-strict_numa-fc59b33123a2-v1
authorChristoph Lameter <cl@gentwo.org>
Mon, 19 Aug 2024 22:06:46 +0000 (15:06 -0700)
committerChristoph Lameter <cl@gentwo.org>
Tue, 20 Aug 2024 01:29:57 +0000 (18:29 -0700)
commit4944a49dd5f942b63aa4e2fcbf927cc0e7eff727
tree5db5f1f9a957e788762b39b5f614dc38cf483c08
parent6e4436539ae182dc86d57d13849862bcafaa4709
SLUB: Add support for per object memory policies

The old SLAB allocator used to support memory policies on a per
allocation bases. In SLUB the memory policies are applied on a
per page frame / folio bases. Doing so avoids having to check memory
policies in critical code paths for kmalloc and friends.

This worked well on Intel/AMD/PowerPC because the
interconnect technology is mature and can minimize the latencies
through intelligent caching even if some small objects are not
placed optimally.

However, on ARM we have the emergence of new NUMA interconnect
technology based more on embedded devices. Caching of remote content
can currently be ineffective using the standard building blocks / mesh
available on that platform. Such architectures benefit if each slab
object is individually placed according to memory policies.

This patch adds another kernel parameter

slab_strict_numa

If that is set then a static branch is activated that will cause
the hotpaths of the allocator to evaluate the current memory
allocation policy. Each object will be properly placed by
paying the price of extra processing and SLUB will no longer
defer to the page allocator to apply memory policies at the
folio level.

Signed-off-by: Christoph Lameter (Ampere) <cl@gentwo.org>
mm/slub.c