Forum Search:
OpenVZ Forum
Members
Search
Help
Register
Login
Home
Home
»
Mailing lists
»
Devel
»
[PATCH v3 00/28] kmem limitation for memcg
Show:
Today's Messages
::
Show Polls
::
Message Navigator
E-mail to friend
[PATCH v3 25/28] slub: create slabinfo file for memcg
[
message #46528
is a reply to
message #46517
]
Fri, 25 May 2012 13:03
Glauber Costa
Messages:
916
Registered:
October 2011
Senior Member
This patch implements mem_cgroup_slabinfo() for the slub.
With that, we can also probe the used caches for it.
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
>
---
mm/slub.c | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index c8a8cab..4c29e5f 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4113,6 +4113,33 @@ struct kmem_cache *kmem_cache_dup(struct mem_cgroup *memcg,
int mem_cgroup_slabinfo(struct mem_cgroup *memcg, struct seq_file *m)
{
+ struct kmem_cache *s;
+ int node;
+ unsigned long nr_objs = 0;
+ unsigned long nr_free = 0;
+
+ seq_printf(m, "# name <active_objs> <num_objs> <objsize>\n");
+
+ down_read(&slub_lock);
+ list_for_each_entry(s, &slab_caches, list) {
+ if (s->memcg_params.memcg != memcg)
+ continue;
+
+ for_each_online_node(node) {
+ struct kmem_cache_node *n = get_node(s, node);
+
+ if (!n)
+ continue;
+
+ nr_objs += atomic_long_read(&n->total_objects);
+ nr_free += count_partial(n, count_free);
+ }
+
+ seq_printf(m, "%-17s %6lu %6lu %6u\n", s->name,
+ nr_objs - nr_free, nr_objs, s->size);
+ }
+ up_read(&slub_lock);
+
return 0;
}
#endif
--
1.7.7.6
Report message to a moderator
[
Message index
]
[PATCH v3 00/28] kmem limitation for memcg
By:
Glauber Costa
on Fri, 25 May 2012 13:03
[PATCH v3 02/28] memcg: Always free struct memcg through schedule_work()
By:
Glauber Costa
on Fri, 25 May 2012 13:03
[PATCH v3 09/28] kmem slab accounting basic infrastructure
By:
Glauber Costa
on Fri, 25 May 2012 13:03
[PATCH v3 08/28] res_counter: don't force return value checking in res_counter_charge_nofail
By:
Glauber Costa
on Fri, 25 May 2012 13:03
[PATCH v3 03/28] slab: rename gfpflags to allocflags
By:
Glauber Costa
on Fri, 25 May 2012 13:03
[PATCH v3 01/28] slab: move FULL state transition to an initcall
By:
Glauber Costa
on Fri, 25 May 2012 13:03
[PATCH v3 18/28] slub: charge allocation to a memcg
By:
Glauber Costa
on Fri, 25 May 2012 13:03
Re: [PATCH v3 18/28] slub: charge allocation to a memcg
By:
Christoph Lameter
on Tue, 29 May 2012 14:51
Re: [PATCH v3 18/28] slub: charge allocation to a memcg
By:
Glauber Costa
on Tue, 29 May 2012 16:06
[PATCH v3 20/28] memcg: disable kmem code when not in use.
By:
Glauber Costa
on Fri, 25 May 2012 13:03
[PATCH v3 22/28] memcg/slub: shrink dead caches
By:
Glauber Costa
on Fri, 25 May 2012 13:03
[PATCH v3 19/28] slab: per-memcg accounting of slab caches
By:
Glauber Costa
on Fri, 25 May 2012 13:03
Re: [PATCH v3 19/28] slab: per-memcg accounting of slab caches
By:
Christoph Lameter
on Tue, 29 May 2012 14:52
Re: [PATCH v3 19/28] slab: per-memcg accounting of slab caches
By:
Glauber Costa
on Tue, 29 May 2012 16:07
Re: [PATCH v3 19/28] slab: per-memcg accounting of slab caches
By:
Glauber Costa
on Tue, 29 May 2012 16:13
[PATCH v3 21/28] memcg: destroy memcg caches
By:
Glauber Costa
on Fri, 25 May 2012 13:03
[PATCH v3 25/28] slub: create slabinfo file for memcg
By:
Glauber Costa
on Fri, 25 May 2012 13:03
[PATCH v3 16/28] memcg: kmem controller charge/uncharge infrastructure
By:
Glauber Costa
on Fri, 25 May 2012 13:03
Re: [PATCH v3 16/28] memcg: kmem controller charge/uncharge infrastructure
By:
Christoph Lameter
on Tue, 29 May 2012 14:47
Re: [PATCH v3 16/28] memcg: kmem controller charge/uncharge infrastructure
By:
Glauber Costa
on Tue, 29 May 2012 16:00
Re: [PATCH v3 16/28] memcg: kmem controller charge/uncharge infrastructure
By:
Frederic Weisbecker
on Wed, 30 May 2012 12:17
Re: [PATCH v3 16/28] memcg: kmem controller charge/uncharge infrastructure
By:
Glauber Costa
on Wed, 30 May 2012 12:26
Re: [PATCH v3 16/28] memcg: kmem controller charge/uncharge infrastructure
By:
Frederic Weisbecker
on Wed, 30 May 2012 12:34
Re: [PATCH v3 16/28] memcg: kmem controller charge/uncharge infrastructure
By:
Glauber Costa
on Wed, 30 May 2012 12:38
Re: [PATCH v3 16/28] memcg: kmem controller charge/uncharge infrastructure
By:
Frederic Weisbecker
on Wed, 30 May 2012 13:11
Re: [PATCH v3 16/28] memcg: kmem controller charge/uncharge infrastructure
By:
Glauber Costa
on Wed, 30 May 2012 13:09
Re: [PATCH v3 16/28] memcg: kmem controller charge/uncharge infrastructure
By:
Frederic Weisbecker
on Wed, 30 May 2012 13:04
Re: [PATCH v3 16/28] memcg: kmem controller charge/uncharge infrastructure
By:
Glauber Costa
on Wed, 30 May 2012 13:06
Re: [PATCH v3 16/28] memcg: kmem controller charge/uncharge infrastructure
By:
Frederic Weisbecker
on Wed, 30 May 2012 13:37
Re: [PATCH v3 16/28] memcg: kmem controller charge/uncharge infrastructure
By:
Glauber Costa
on Wed, 30 May 2012 13:37
Re: [PATCH v3 16/28] memcg: kmem controller charge/uncharge infrastructure
By:
Frederic Weisbecker
on Wed, 30 May 2012 13:53
Re: [PATCH v3 16/28] memcg: kmem controller charge/uncharge infrastructure
By:
Glauber Costa
on Wed, 30 May 2012 13:55
Re: [PATCH v3 16/28] memcg: kmem controller charge/uncharge infrastructure
By:
Frederic Weisbecker
on Wed, 30 May 2012 15:33
Re: [PATCH v3 16/28] memcg: kmem controller charge/uncharge infrastructure
By:
Glauber Costa
on Wed, 30 May 2012 16:16
[PATCH v3 24/28] memcg: Per-memcg memory.kmem.slabinfo file.
By:
Glauber Costa
on Fri, 25 May 2012 13:03
[PATCH v3 06/28] slab: use obj_size field of struct kmem_cache when not debugging
By:
Glauber Costa
on Fri, 25 May 2012 13:03
[PATCH v3 10/28] slab/slub: struct memcg_params
By:
Glauber Costa
on Fri, 25 May 2012 13:03
[PATCH v3 12/28] slab: pass memcg parameter to kmem_cache_create
By:
Glauber Costa
on Fri, 25 May 2012 13:03
Re: [PATCH v3 12/28] slab: pass memcg parameter to kmem_cache_create
By:
Christoph Lameter
on Tue, 29 May 2012 14:27
Re: [PATCH v3 12/28] slab: pass memcg parameter to kmem_cache_create
By:
Glauber Costa
on Tue, 29 May 2012 15:50
Re: [PATCH v3 12/28] slab: pass memcg parameter to kmem_cache_create
By:
Christoph Lameter
on Tue, 29 May 2012 16:33
Re: [PATCH v3 12/28] slab: pass memcg parameter to kmem_cache_create
By:
Glauber Costa
on Tue, 29 May 2012 16:36
Re: [PATCH v3 12/28] slab: pass memcg parameter to kmem_cache_create
By:
Christoph Lameter
on Tue, 29 May 2012 16:52
Re: [PATCH v3 12/28] slab: pass memcg parameter to kmem_cache_create
By:
Glauber Costa
on Tue, 29 May 2012 16:59
Re: [PATCH v3 12/28] slab: pass memcg parameter to kmem_cache_create
By:
Frederic Weisbecker
on Wed, 30 May 2012 11:01
[PATCH v3 14/28] slab: create duplicate cache
By:
Glauber Costa
on Fri, 25 May 2012 13:03
[PATCH v3 15/28] slub: always get the cache from its page in kfree
By:
Glauber Costa
on Fri, 25 May 2012 13:03
Re: [PATCH v3 15/28] slub: always get the cache from its page in kfree
By:
Christoph Lameter
on Tue, 29 May 2012 14:42
Re: [PATCH v3 15/28] slub: always get the cache from its page in kfree
By:
Glauber Costa
on Tue, 29 May 2012 15:59
[PATCH v3 17/28] skip memcg kmem allocations in specified code regions
By:
Glauber Costa
on Fri, 25 May 2012 13:03
[PATCH v3 13/28] slub: create duplicate cache
By:
Glauber Costa
on Fri, 25 May 2012 13:03
Re: [PATCH v3 13/28] slub: create duplicate cache
By:
Christoph Lameter
on Tue, 29 May 2012 14:36
Re: [PATCH v3 13/28] slub: create duplicate cache
By:
Glauber Costa
on Tue, 29 May 2012 15:56
Re: [PATCH v3 13/28] slub: create duplicate cache
By:
Christoph Lameter
on Tue, 29 May 2012 16:05
Re: [PATCH v3 13/28] slub: create duplicate cache
By:
Glauber Costa
on Tue, 29 May 2012 17:05
Re: [PATCH v3 13/28] slub: create duplicate cache
By:
Christoph Lameter
on Tue, 29 May 2012 17:25
Re: [PATCH v3 13/28] slub: create duplicate cache
By:
Glauber Costa
on Tue, 29 May 2012 17:27
Re: [PATCH v3 13/28] slub: create duplicate cache
By:
Christoph Lameter
on Tue, 29 May 2012 19:26
Re: [PATCH v3 13/28] slub: create duplicate cache
By:
Glauber Costa
on Tue, 29 May 2012 19:40
Re: [PATCH v3 13/28] slub: create duplicate cache
By:
Christoph Lameter
on Tue, 29 May 2012 19:55
Re: [PATCH v3 13/28] slub: create duplicate cache
By:
Glauber Costa
on Tue, 29 May 2012 20:08
Re: [PATCH v3 13/28] slub: create duplicate cache
By:
Christoph Lameter
on Tue, 29 May 2012 20:21
Re: [PATCH v3 13/28] slub: create duplicate cache
By:
Glauber Costa
on Tue, 29 May 2012 20:25
Re: [PATCH v3 13/28] slub: create duplicate cache
By:
Tejun Heo
on Wed, 30 May 2012 01:29
Re: Re: [PATCH v3 13/28] slub: create duplicate cache
By:
James Bottomley
on Wed, 30 May 2012 07:28
Re: [PATCH v3 13/28] slub: create duplicate cache
By:
Glauber Costa
on Wed, 30 May 2012 07:54
Re: [PATCH v3 13/28] slub: create duplicate cache
By:
Tejun Heo
on Wed, 30 May 2012 08:02
Re: [PATCH v3 13/28] slub: create duplicate cache
By:
Christoph Lameter
on Wed, 30 May 2012 15:37
Re: [PATCH v3 13/28] slub: create duplicate cache
By:
Suleiman Souhlal
on Tue, 29 May 2012 20:57
[PATCH v3 11/28] slub: consider a memcg parameter in kmem_create_cache
By:
Glauber Costa
on Fri, 25 May 2012 13:03
[PATCH v3 26/28] slub: track all children of a kmem cache
By:
Glauber Costa
on Fri, 25 May 2012 13:03
[PATCH v3 28/28] Documentation: add documentation for slab tracker for memcg
By:
Glauber Costa
on Fri, 25 May 2012 13:03
[PATCH v3 23/28] slab: Track all the memcg children of a kmem_cache.
By:
Glauber Costa
on Fri, 25 May 2012 13:03
[PATCH v3 27/28] memcg: propagate kmem limiting information to children
By:
Glauber Costa
on Fri, 25 May 2012 13:03
Re: [PATCH v3 00/28] kmem limitation for memcg
By:
Michal Hocko
on Fri, 25 May 2012 13:34
Re: [PATCH v3 00/28] kmem limitation for memcg
By:
Christoph Lameter
on Fri, 25 May 2012 14:34
Re: [PATCH v3 00/28] kmem limitation for memcg
By:
Glauber Costa
on Mon, 28 May 2012 08:32
Re: [PATCH v3 00/28] kmem limitation for memcg
By:
Christoph Lameter
on Tue, 29 May 2012 15:07
Re: [PATCH v3 00/28] kmem limitation for memcg
By:
Glauber Costa
on Tue, 29 May 2012 15:44
Re: [PATCH v3 00/28] kmem limitation for memcg
By:
Christoph Lameter
on Tue, 29 May 2012 16:01
Re: [PATCH v3 00/28] kmem limitation for memcg
By:
Frederic Weisbecker
on Thu, 07 June 2012 10:26
Re: [PATCH v3 00/28] kmem limitation for memcg
By:
Glauber Costa
on Thu, 07 June 2012 10:53
Re: [PATCH v3 00/28] kmem limitation for memcg
By:
Frederic Weisbecker
on Thu, 07 June 2012 14:00
Re: [PATCH v3 00/28] kmem limitation for memcg
By:
KAMEZAWA Hiroyuki
on Thu, 14 June 2012 02:24
Previous Topic:
[PATCH] NFS: hard-code init_net for NFS callback transports
Next Topic:
[PATCH v4 0/4] per cgroup cpu statistics
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:
Fri Nov 15 13:00:50 GMT 2024
Total time taken to generate the page: 0.03412 seconds