Re: [PATCH v2] net: skbuff: set FLAG_SKB_NO_MERGE for skbuff_fclone_cache

From: Christoph Lameter (Ampere)
Date: Thu Feb 29 2024 - 12:58:13 EST


On Thu, 29 Feb 2024, Eric Dumazet wrote:

If you do not specify a node or GFP_THISNODE then the slub allocator will
opportunistically allocate sporadically from other nodes to avoid
fragmentation of slabs. The page allocator also will sporadically go off
node in order to avoid reclaim. The page allocator may go off node
extensively if there is a imbalance of allocation between node. The page
allocator has knobs to tune off node vs reclaim options. Doing more
reclaim will slow things down but give you local data.

Maybe, maybe not.

Going back to CONFIG_SLAB=y removes all mismatches, without having to
use GFP_THISNODE at all,
on hosts with plenty of available memory on all nodes.


Slab uses GFPTHISNODE by default and does not respect the memory policies etc set for pages. As such it will causes additional overhead through reclaim passses etc and memory policies will not be applied on a per page level (as specd) but in its own layer on a per object basis. It causes additional fragmentation.

I think that is some kind of evidence that something is broken in SLUB land.

That is one of the reasons that SLAB was removed.

Slub defragmentation can be disabled by either GFP_THISNODE or tuning the remote_claim knob in /sys/kernel/slab/<slabname>