Skip to contentSkip to conversation

mm-slub-wrap-kmem_cache-cpu_partial-in-config-config_slub_cpu_partial.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jul 7, 2017

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled

     Subject: mm/slub.c: wrap kmem_cache->cpu_partial in config CONFIG_SLUB_CPU_PARTIAL

has been removed from the -mm tree. Its filename was
mm-slub-wrap-kmem_cache-cpu_partial-in-config-config_slub_cpu_partial.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Wei Yang <[email protected]>
Subject: mm/slub.c: wrap kmem_cache->cpu_partial in config CONFIG_SLUB_CPU_PARTIAL

kmem_cache->cpu_partial is just used when CONFIG_SLUB_CPU_PARTIAL is set, so wrap it with config CONFIG_SLUB_CPU_PARTIAL will save some space on 32bit arch.

This patch wraps kmem_cache->cpu_partial in config CONFIG_SLUB_CPU_PARTIAL and wraps its sysfs too.

---

 include/linux/slub_def.h |   13 ++++++
 mm/slub.c                |   69 ++++++++++++++++++++-----------------
 2 files changed, 51 insertions(+), 31 deletions(-)
include/linux/slub_def.h renamed from include/linux/slub_def.h~mm-slub-wrap-kmem_cache-cpu_partial-in-config-config_slub_cpu_partial +13 -0
diff -puN include/linux/slub_def.h~mm-slub-wrap-kmem_cache-cpu_partial-in-config-config_slub_cpu_partial include/linux/slub_def.h
@@ -86,7 +86,9 @@ struct kmem_cache {
 	int size;		/* The size of an object including meta data */
 	int object_size;	/* The size of an object without meta data */
 	int offset;		/* Free pointer offset. */
+#ifdef CONFIG_SLUB_CPU_PARTIAL
 	int cpu_partial;	/* Number of per cpu partial objects to keep around */
+#endif
 	struct kmem_cache_order_objects oo;
 
 	/* Allocation and freeing of slabs */
@@ -131,6 +133,17 @@ struct kmem_cache {
 	struct kmem_cache_node *node[MAX_NUMNODES];
 };
 
+#ifdef CONFIG_SLUB_CPU_PARTIAL
+#define slub_cpu_partial(s)		((s)->cpu_partial)
+#define slub_set_cpu_partial(s, n)		\
+({						\
+	slub_cpu_partial(s) = (n);		\
+})
+#else
+#define slub_cpu_partial(s)		(0)
+#define slub_set_cpu_partial(s, n)
+#endif // CONFIG_SLUB_CPU_PARTIAL
+
 #ifdef CONFIG_SYSFS
 #define SLAB_SUPPORTS_SYSFS
 void sysfs_slab_release(struct kmem_cache *);
mm/slub.c renamed from mm/slub.c~mm-slub-wrap-kmem_cache-cpu_partial-in-config-config_slub_cpu_partial +38 -31

105 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are

mm-memory_hotplug-just-build-zonelist-for-new-added-node.patch mm-page_alloc-return-0-in-case-this-node-has-no-page-within-the-zone.patch