Lines Matching refs:s

89 int slab_unmergeable(struct kmem_cache *s);
160 void get_slabinfo(struct kmem_cache *s, struct slabinfo *sinfo);
161 void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *s);
178 static inline bool is_root_cache(struct kmem_cache *s) in is_root_cache() argument
180 return s->memcg_params.is_root_cache; in is_root_cache()
183 static inline bool slab_equal_or_root(struct kmem_cache *s, in slab_equal_or_root() argument
186 return p == s || p == s->memcg_params.root_cache; in slab_equal_or_root()
194 static inline const char *cache_name(struct kmem_cache *s) in cache_name() argument
196 if (!is_root_cache(s)) in cache_name()
197 s = s->memcg_params.root_cache; in cache_name()
198 return s->name; in cache_name()
207 cache_from_memcg_idx(struct kmem_cache *s, int idx) in cache_from_memcg_idx() argument
213 arr = rcu_dereference(s->memcg_params.memcg_caches); in cache_from_memcg_idx()
226 static inline struct kmem_cache *memcg_root_cache(struct kmem_cache *s) in memcg_root_cache() argument
228 if (is_root_cache(s)) in memcg_root_cache()
229 return s; in memcg_root_cache()
230 return s->memcg_params.root_cache; in memcg_root_cache()
233 static __always_inline int memcg_charge_slab(struct kmem_cache *s, in memcg_charge_slab() argument
238 if (is_root_cache(s)) in memcg_charge_slab()
240 return memcg_charge_kmem(s->memcg_params.memcg, gfp, 1 << order); in memcg_charge_slab()
243 static __always_inline void memcg_uncharge_slab(struct kmem_cache *s, int order) in memcg_uncharge_slab() argument
247 if (is_root_cache(s)) in memcg_uncharge_slab()
249 memcg_uncharge_kmem(s->memcg_params.memcg, 1 << order); in memcg_uncharge_slab()
261 static inline bool is_root_cache(struct kmem_cache *s) in is_root_cache() argument
266 static inline bool slab_equal_or_root(struct kmem_cache *s, in slab_equal_or_root() argument
272 static inline const char *cache_name(struct kmem_cache *s) in cache_name() argument
274 return s->name; in cache_name()
278 cache_from_memcg_idx(struct kmem_cache *s, int idx) in cache_from_memcg_idx() argument
283 static inline struct kmem_cache *memcg_root_cache(struct kmem_cache *s) in memcg_root_cache() argument
285 return s; in memcg_root_cache()
288 static inline int memcg_charge_slab(struct kmem_cache *s, gfp_t gfp, int order) in memcg_charge_slab() argument
293 static inline void memcg_uncharge_slab(struct kmem_cache *s, int order) in memcg_uncharge_slab() argument
297 static inline void slab_init_memcg_params(struct kmem_cache *s) in slab_init_memcg_params() argument
302 static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x) in cache_from_obj() argument
314 if (!memcg_kmem_enabled() && !unlikely(s->flags & SLAB_DEBUG_FREE)) in cache_from_obj()
315 return s; in cache_from_obj()
319 if (slab_equal_or_root(cachep, s)) in cache_from_obj()
323 __func__, cachep->name, s->name); in cache_from_obj()
325 return s; in cache_from_obj()
360 static inline struct kmem_cache_node *get_node(struct kmem_cache *s, int node) in get_node() argument
362 return s->node[node]; in get_node()