]> Pileus Git - ~andy/linux/blobdiff - include/linux/slab.h
Merge branch 'slab/next' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
[~andy/linux] / include / linux / slab.h
index f76e956b4011e2a67ee7b1fafa283bc2ebc8e483..9260abdd67df801e002f18faf3f17bd00d494867 100644 (file)
@@ -513,7 +513,9 @@ static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node)
  *
  * Both the root cache and the child caches will have it. For the root cache,
  * this will hold a dynamically allocated array large enough to hold
- * information about the currently limited memcgs in the system.
+ * information about the currently limited memcgs in the system. To allow the
+ * array to be accessed without taking any locks, on relocation we free the old
+ * version only after a grace period.
  *
  * Child caches will hold extra metadata needed for its operation. Fields are:
  *
@@ -528,7 +530,10 @@ static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node)
 struct memcg_cache_params {
        bool is_root_cache;
        union {
-               struct kmem_cache *memcg_caches[0];
+               struct {
+                       struct rcu_head rcu_head;
+                       struct kmem_cache *memcg_caches[0];
+               };
                struct {
                        struct mem_cgroup *memcg;
                        struct list_head list;