summaryrefslogtreecommitdiff
path: root/include/linux/slab.h
diff options
context:
space:
mode:
authorVlastimil Babka <vbabka@suse.cz>2022-11-16 16:48:23 +0100
committerVlastimil Babka <vbabka@suse.cz>2022-11-27 23:40:39 +0100
commit3d97d976e5d58554570003ca5297a67142ae4e29 (patch)
treebb012bd3333c67ecd04e89282d3b32ab3153a6d8 /include/linux/slab.h
parent2f7c1c1396b587e8cfe18a1f0d628cedaae56b6a (diff)
mm, slab: ignore SLAB_RECLAIM_ACCOUNT with CONFIG_SLUB_TINY
SLAB_RECLAIM_ACCOUNT caches allocate their slab pages with __GFP_RECLAIMABLE and can help against fragmentation by grouping pages by mobility, but on tiny systems mobility grouping is likely disabled anyway and ignoring SLAB_RECLAIM_ACCOUNT might instead lead to merging of caches that are made incompatible just by the flag. Thus with CONFIG_SLUB_TINY, make SLAB_RECLAIM_ACCOUNT ineffective. Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Mike Rapoport <rppt@linux.ibm.com> Reviewed-by: Christoph Lameter <cl@linux.com>
Diffstat (limited to 'include/linux/slab.h')
-rw-r--r--include/linux/slab.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h
index ae2d19ec8467..37fa41af24b6 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -129,7 +129,11 @@
/* The following flags affect the page allocator grouping pages by mobility */
/* Objects are reclaimable */
+#ifndef CONFIG_SLUB_TINY
#define SLAB_RECLAIM_ACCOUNT ((slab_flags_t __force)0x00020000U)
+#else
+#define SLAB_RECLAIM_ACCOUNT ((slab_flags_t __force)0)
+#endif
#define SLAB_TEMPORARY SLAB_RECLAIM_ACCOUNT /* Objects are short-lived */
/*