[PATCH] slab: document why cache can have no per cpu array on kfree
From: Vladimir Davydov
Date: Wed Jun 25 2014 - 10:39:57 EST
Signed-off-by: Vladimir Davydov <vdavydov@xxxxxxxxxxxxx>
---
mm/slab.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/mm/slab.c b/mm/slab.c
index 6009e44a4d1d..4cb2619277ff 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3530,6 +3530,10 @@ static inline void __cache_free(struct kmem_cache *cachep, void *objp,
kmemcheck_slab_free(cachep, objp, cachep->object_size);
#ifdef CONFIG_MEMCG_KMEM
+ /*
+ * Per cpu arrays are disabled for dead memcg caches in order not to
+ * prevent self-destruction.
+ */
if (unlikely(!ac)) {
int nodeid = page_to_nid(virt_to_page(objp));
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/