lkml.org 
[lkml]   [2014]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] slab: document why cache can have no per cpu array on kfree
Date
Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
---
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


\
 
 \ /
  Last update: 2014-06-25 17:41    [W:0.310 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site