Home » Mailing lists » Devel » [PATCH v3 04/13] kmem accounting basic infrastructure
Re: [PATCH v3 04/13] kmem accounting basic infrastructure [message #47977 is a reply to message #47884] |
Fri, 21 September 2012 16:34   |
Tejun Heo
Messages: 184 Registered: November 2006
|
Senior Member |
|
|
On Tue, Sep 18, 2012 at 06:04:01PM +0400, Glauber Costa wrote:
> #ifdef CONFIG_MEMCG_KMEM
> +static struct cftype kmem_cgroup_files[] = {
> + {
> + .name = "kmem.limit_in_bytes",
> + .private = MEMFILE_PRIVATE(_KMEM, RES_LIMIT),
> + .write_string = mem_cgroup_write,
> + .read = mem_cgroup_read,
> + },
> + {
> + .name = "kmem.usage_in_bytes",
> + .private = MEMFILE_PRIVATE(_KMEM, RES_USAGE),
> + .read = mem_cgroup_read,
> + },
> + {
> + .name = "kmem.failcnt",
> + .private = MEMFILE_PRIVATE(_KMEM, RES_FAILCNT),
> + .trigger = mem_cgroup_reset,
> + .read = mem_cgroup_read,
> + },
> + {
> + .name = "kmem.max_usage_in_bytes",
> + .private = MEMFILE_PRIVATE(_KMEM, RES_MAX_USAGE),
> + .trigger = mem_cgroup_reset,
> + .read = mem_cgroup_read,
> + },
> + {},
> +};
> +
> static int memcg_init_kmem(struct mem_cgroup *memcg, struct cgroup_subsys *ss)
> {
> return mem_cgroup_sockets_init(memcg, ss);
> @@ -4961,6 +5015,12 @@ mem_cgroup_create(struct cgroup *cont)
> int cpu;
> enable_swap_cgroup();
> parent = NULL;
> +
> +#ifdef CONFIG_MEMCG_KMEM
> + WARN_ON(cgroup_add_cftypes(&mem_cgroup_subsys,
> + kmem_cgroup_files));
> +#endif
> +
Why not just make it part of mem_cgroup_files[]?
Thanks.
--
tejun
|
|
|
 |
|
[PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Fri, 21 September 2012 16:34
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Wed, 26 September 2012 16:36
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Wed, 26 September 2012 17:44
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Wed, 26 September 2012 18:01
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Wed, 26 September 2012 19:34
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Wed, 26 September 2012 19:56
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Wed, 26 September 2012 20:16
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Wed, 26 September 2012 22:10
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Wed, 26 September 2012 22:42
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Wed, 26 September 2012 23:08
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Wed, 26 September 2012 23:33
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Thu, 27 September 2012 14:49
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Thu, 27 September 2012 17:46
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Sun, 30 September 2012 07:57
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Sun, 30 September 2012 08:02
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Sun, 30 September 2012 10:37
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Thu, 27 September 2012 14:33
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Thu, 27 September 2012 14:58
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Sun, 30 September 2012 08:23
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
By: Tejun Heo on Sun, 30 September 2012 08:47
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
 |
|
Re: [PATCH v3 04/13] kmem accounting basic infrastructure
|
Goto Forum:
Current Time: Sun Aug 31 08:14:02 GMT 2025
Total time taken to generate the page: 0.07606 seconds
|