Forum Search:
OpenVZ Forum
Members
Search
Help
Register
Login
Home
Home
»
Mailing lists
»
Devel
»
[PATCH 00/23] slab+slub accounting for memcg
Show:
Today's Messages
::
Show Polls
::
Message Navigator
E-mail to friend
[PATCH 10/23] slab/slub: struct memcg_params
[
message #45999
is a reply to
message #45989
]
Fri, 20 April 2012 21:57
Glauber Costa
Messages:
916
Registered:
October 2011
Senior Member
For the kmem slab controller, we need to record some extra
information in the kmem_cache structure.
Signed-off-by: Glauber Costa <
glommer@parallels.com
>
CC: Christoph Lameter <
cl@linux.com
>
CC: Pekka Enberg <
penberg@cs.helsinki.fi
>
CC: Michal Hocko <
mhocko@suse.cz
>
CC: Kamezawa Hiroyuki <
kamezawa.hiroyu@jp.fujitsu.com
>
CC: Johannes Weiner <
hannes@cmpxchg.org
>
CC: Suleiman Souhlal <
suleiman@google.com
>
---
include/linux/slab.h | 15 +++++++++++++++
include/linux/slab_def.h | 4 ++++
include/linux/slub_def.h | 3 +++
3 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/include/linux/slab.h b/include/linux/slab.h
index a595dce..a5127e1 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -153,6 +153,21 @@ unsigned int kmem_cache_size(struct kmem_cache *);
#define ARCH_SLAB_MINALIGN __alignof__(unsigned long long)
#endif
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
+struct mem_cgroup_cache_params {
+ struct mem_cgroup *memcg;
+ int id;
+
+#ifdef CONFIG_SLAB
+ /* Original cache parameters, used when creating a memcg cache */
+ size_t orig_align;
+ atomic_t refcnt;
+
+#endif
+ struct list_head destroyed_list; /* Used when deleting cpuset cache */
+};
+#endif
+
/*
* Common kmalloc functions provided by all allocators
*/
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h
index cba3139..06e4a3e 100644
--- a/include/linux/slab_def.h
+++ b/include/linux/slab_def.h
@@ -83,6 +83,10 @@ struct kmem_cache {
int obj_size;
#endif
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
+ struct mem_cgroup_cache_params memcg_params;
+#endif
+
/* 6) per-cpu/per-node data, touched during every alloc/free */
/*
* We put array[] at the end of kmem_cache, because we want to size
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index c2f8c8b..5f5e942 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -102,6 +102,9 @@ struct kmem_cache {
#ifdef CONFIG_SYSFS
struct kobject kobj; /* For sysfs */
#endif
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM
+ struct mem_cgroup_cache_params memcg_params;
+#endif
#ifdef CONFIG_NUMA
/*
--
1.7.7.6
Report message to a moderator
[
Message index
]
[PATCH 00/23] slab+slub accounting for memcg
By:
Glauber Costa
on Fri, 20 April 2012 21:57
[PATCH 02/23] slub: always get the cache from its page in kfree
By:
Glauber Costa
on Fri, 20 April 2012 21:57
[PATCH 04/23] memcg: Make it possible to use the stock for more than one page.
By:
Glauber Costa
on Fri, 20 April 2012 21:57
Re: [PATCH 04/23] memcg: Make it possible to use the stock for more than one page.
By:
KAMEZAWA Hiroyuki
on Wed, 25 April 2012 00:59
[PATCH 03/23] slab: rename gfpflags to allocflags
By:
Glauber Costa
on Fri, 20 April 2012 21:57
[PATCH 07/23] change defines to an enum
By:
Glauber Costa
on Fri, 20 April 2012 21:57
Re: [PATCH 07/23] change defines to an enum
By:
KAMEZAWA Hiroyuki
on Wed, 25 April 2012 01:18
[PATCH 05/23] memcg: Reclaim when more than one page needed.
By:
Glauber Costa
on Fri, 20 April 2012 21:57
Re: [PATCH 05/23] memcg: Reclaim when more than one page needed.
By:
KAMEZAWA Hiroyuki
on Wed, 25 April 2012 01:16
[PATCH 09/23] kmem slab accounting basic infrastructure
By:
Glauber Costa
on Fri, 20 April 2012 21:57
Re: [PATCH 09/23] kmem slab accounting basic infrastructure
By:
KAMEZAWA Hiroyuki
on Wed, 25 April 2012 01:32
Re: [PATCH 09/23] kmem slab accounting basic infrastructure
By:
Glauber Costa
on Wed, 25 April 2012 14:38
Re: [PATCH 09/23] kmem slab accounting basic infrastructure
By:
KAMEZAWA Hiroyuki
on Thu, 26 April 2012 00:08
Re: [PATCH 09/23] kmem slab accounting basic infrastructure
By:
Suleiman Souhlal
on Mon, 30 April 2012 19:33
Re: [PATCH 09/23] kmem slab accounting basic infrastructure
By:
Glauber Costa
on Wed, 02 May 2012 15:15
[PATCH 08/23] don't force return value checking in res_counter_charge_nofail
By:
Glauber Costa
on Fri, 20 April 2012 21:57
Re: [PATCH 08/23] don't force return value checking in res_counter_charge_nofail
By:
KAMEZAWA Hiroyuki
on Wed, 25 April 2012 01:28
[PATCH 06/23] slab: use obj_size field of struct kmem_cache when not debugging
By:
Glauber Costa
on Fri, 20 April 2012 21:57
[PATCH 01/23] slub: don't create a copy of the name string in kmem_cache_create
By:
Glauber Costa
on Fri, 20 April 2012 21:57
[PATCH 10/23] slab/slub: struct memcg_params
By:
Glauber Costa
on Fri, 20 April 2012 21:57
Re: [PATCH 10/23] slab/slub: struct memcg_params
By:
Suleiman Souhlal
on Mon, 30 April 2012 19:42
[PATCH 11/23] slub: consider a memcg parameter in kmem_create_cache
By:
Glauber Costa
on Fri, 20 April 2012 21:57
Re: [PATCH 11/23] slub: consider a memcg parameter in kmem_create_cache
By:
Frederic Weisbecker
on Tue, 24 April 2012 14:03
Re: [PATCH 11/23] slub: consider a memcg parameter in kmem_create_cache
By:
Glauber Costa
on Tue, 24 April 2012 14:27
Re: [PATCH 11/23] slub: consider a memcg parameter in kmem_create_cache
By:
KAMEZAWA Hiroyuki
on Wed, 25 April 2012 01:38
Re: [PATCH 11/23] slub: consider a memcg parameter in kmem_create_cache
By:
Glauber Costa
on Wed, 25 April 2012 14:37
Re: [PATCH 11/23] slub: consider a memcg parameter in kmem_create_cache
By:
Suleiman Souhlal
on Mon, 30 April 2012 19:51
Re: [PATCH 11/23] slub: consider a memcg parameter in kmem_create_cache
By:
Glauber Costa
on Wed, 02 May 2012 15:18
[PATCH 12/23] slab: pass memcg parameter to kmem_cache_create
By:
Glauber Costa
on Sun, 22 April 2012 23:53
Re: [PATCH 12/23] slab: pass memcg parameter to kmem_cache_create
By:
Suleiman Souhlal
on Mon, 30 April 2012 19:54
[PATCH 21/23] memcg: Track all the memcg children of a kmem_cache.
By:
Glauber Costa
on Sun, 22 April 2012 23:53
[PATCH 13/23] slub: create duplicate cache
By:
Glauber Costa
on Sun, 22 April 2012 23:53
Re: [PATCH 13/23] slub: create duplicate cache
By:
Frederic Weisbecker
on Tue, 24 April 2012 14:18
Re: [PATCH 13/23] slub: create duplicate cache
By:
Glauber Costa
on Tue, 24 April 2012 14:37
Re: [PATCH 13/23] slub: create duplicate cache
By:
Frederic Weisbecker
on Thu, 26 April 2012 13:10
Re: [PATCH 13/23] slub: create duplicate cache
By:
Suleiman Souhlal
on Mon, 30 April 2012 20:15
[PATCH 15/23] slab: create duplicate cache
By:
Glauber Costa
on Sun, 22 April 2012 23:53
[PATCH 14/23] slub: provide kmalloc_no_account
By:
Glauber Costa
on Sun, 22 April 2012 23:53
[PATCH 22/23] memcg: Per-memcg memory.kmem.slabinfo file.
By:
Glauber Costa
on Sun, 22 April 2012 23:53
[PATCH 16/23] slab: provide kmalloc_no_account
By:
Glauber Costa
on Sun, 22 April 2012 23:53
Re: [PATCH 16/23] slab: provide kmalloc_no_account
By:
KAMEZAWA Hiroyuki
on Wed, 25 April 2012 01:44
Re: [PATCH 16/23] slab: provide kmalloc_no_account
By:
Glauber Costa
on Wed, 25 April 2012 14:29
Re: [PATCH 16/23] slab: provide kmalloc_no_account
By:
KAMEZAWA Hiroyuki
on Thu, 26 April 2012 00:13
[PATCH 18/23] slub: charge allocation to a memcg
By:
Glauber Costa
on Sun, 22 April 2012 23:53
[PATCH 17/23] kmem controller charge/uncharge infrastructure
By:
Glauber Costa
on Sun, 22 April 2012 23:53
Re: [PATCH 17/23] kmem controller charge/uncharge infrastructure
By:
David Rientjes
on Mon, 23 April 2012 22:25
Re: [PATCH 17/23] kmem controller charge/uncharge infrastructure
By:
Frederic Weisbecker
on Tue, 24 April 2012 14:22
Re: [PATCH 17/23] kmem controller charge/uncharge infrastructure
By:
Glauber Costa
on Tue, 24 April 2012 14:40
Re: [PATCH 17/23] kmem controller charge/uncharge infrastructure
By:
David Rientjes
on Tue, 24 April 2012 20:25
Re: [PATCH 17/23] kmem controller charge/uncharge infrastructure
By:
Glauber Costa
on Tue, 24 April 2012 21:36
Re: [PATCH 17/23] kmem controller charge/uncharge infrastructure
By:
David Rientjes
on Tue, 24 April 2012 22:54
Re: [PATCH 17/23] kmem controller charge/uncharge infrastructure
By:
Glauber Costa
on Wed, 25 April 2012 14:43
Re: [PATCH 17/23] kmem controller charge/uncharge infrastructure
By:
David Rientjes
on Tue, 24 April 2012 20:21
Re: [PATCH 17/23] kmem controller charge/uncharge infrastructure
By:
Frederic Weisbecker
on Fri, 27 April 2012 11:38
Re: [PATCH 17/23] kmem controller charge/uncharge infrastructure
By:
David Rientjes
on Fri, 27 April 2012 18:13
Re: [PATCH 17/23] kmem controller charge/uncharge infrastructure
By:
KAMEZAWA Hiroyuki
on Wed, 25 April 2012 01:56
Re: [PATCH 17/23] kmem controller charge/uncharge infrastructure
By:
Glauber Costa
on Wed, 25 April 2012 14:44
Re: [PATCH 17/23] kmem controller charge/uncharge infrastructure
By:
Frederic Weisbecker
on Fri, 27 April 2012 12:22
Re: [PATCH 17/23] kmem controller charge/uncharge infrastructure
By:
Suleiman Souhlal
on Mon, 30 April 2012 20:56
Re: [PATCH 17/23] kmem controller charge/uncharge infrastructure
By:
Glauber Costa
on Wed, 02 May 2012 15:34
[PATCH 19/23] slab: per-memcg accounting of slab caches
By:
Glauber Costa
on Sun, 22 April 2012 23:53
Re: [PATCH 19/23] slab: per-memcg accounting of slab caches
By:
Suleiman Souhlal
on Mon, 30 April 2012 21:25
Re: [PATCH 19/23] slab: per-memcg accounting of slab caches
By:
Glauber Costa
on Wed, 02 May 2012 15:40
[PATCH 23/23] slub: create slabinfo file for memcg
By:
Glauber Costa
on Sun, 22 April 2012 23:53
[PATCH 20/23] memcg: disable kmem code when not in use.
By:
Glauber Costa
on Sun, 22 April 2012 23:53
Re: [PATCH 00/23] slab+slub accounting for memcg
By:
Glauber Costa
on Sun, 22 April 2012 23:59
[PATCH 0/3] A few fixes for '[PATCH 00/23] slab+slub accounting for memcg' series
By:
Anton Vorontsov
on Mon, 30 April 2012 09:59
[PATCH 1/3] slab: Proper off-slabs handling when duplicating caches
By:
Anton Vorontsov
on Mon, 30 April 2012 10:01
[PATCH 2/3] slab: Fix imbalanced rcu locking
By:
Anton Vorontsov
on Mon, 30 April 2012 10:01
[PATCH 3/3] slab: Get rid of mem_cgroup_put_kmem_cache()
By:
Anton Vorontsov
on Mon, 30 April 2012 10:02
Previous Topic:
[PATCH 00/23] slab+slub accounting for memcg
Next Topic:
[PATCH v3 0/2] SUNRPC: separate per-net data creation from service
Goto Forum:
- General
Virtuozzo 7 Beta Program
Support
HowTo
Discussions
- Mailing lists
Users
Devel
- International
German
French
Russian
- Test
TestForum
ml-test
-=]
Back to Top
[=-
[
Syndicate this forum (XML)
] [
] [
]
Current Time:
Thu Oct 09 12:05:51 GMT 2025
Total time taken to generate the page: 0.15419 seconds