Skip to contentSkip to conversation

slab: reintroduce cpu_cache_get_on_cpu() static inline

PATCH New Paul Gortmaker 1 participant 1 message Oct 8, 2013 Memory management

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 slab: reintroduce cpu_cache_get_on_cpu() static inline

It was present in the 3.8-rt series, in mm-slab-wrap-functions.patch but got dropped in the v3.10-rt series. Without it, compile of SLAB breaks, even for !RT_FULL builds.

---

[Should be squashed into patches/mm-slab-wrap-functions.patch ]

 mm/slab.c | 6 ++++++
 1 file changed, 6 insertions(+)
mm/slab.c +6 -0
index 0a3d6d3..b242b50 100644
@@ -700,6 +700,12 @@ static inline struct array_cache *cpu_cache_get(struct kmem_cache *cachep)
 	return cachep->array[smp_processor_id()];
 }
 
+static inline struct array_cache *cpu_cache_get_on_cpu(struct kmem_cache *cachep,
+						       int cpu)
+{
+	return cachep->array[cpu];
+}
+
 static size_t slab_mgmt_size(size_t nr_objs, size_t align)
 {
 	return ALIGN(sizeof(struct slab)+nr_objs*sizeof(kmem_bufctl_t), align);
Signature · 1 line
1.8.1.2