[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <514C14BF.3050009@parallels.com>
Date: Fri, 22 Mar 2013 12:22:23 +0400
From: Glauber Costa <glommer@...allels.com>
To: Li Zefan <lizefan@...wei.com>
CC: Michal Hocko <mhocko@...e.cz>, Tejun Heo <tj@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Cgroups <cgroups@...r.kernel.org>, <linux-mm@...ck.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Johannes Weiner <hannes@...xchg.org>
Subject: Re: [PATCH] memcg: fix memcg_cache_name() to use cgroup_name()
On 03/22/2013 12:17 PM, Li Zefan wrote:
>> GFP_TEMPORARY groups short lived allocations but the mem cache is not
>> > an ideal candidate of this type of allocations..
>> >
> I'm not sure I'm following you...
>
> char *memcg_cache_name()
> {
> char *name = alloc();
> return name;
> }
>
> kmem_cache_dup()
> {
> name = memcg_cache_name();
> kmem_cache_create_memcg(name);
> free(name);
> }
>
> Isn't this a short lived allocation?
>
Hi,
Thanks for identifying and fixing this.
Li is right. The cache name will live long, but this is because the
slab/slub caches will strdup it internally. So the actual memcg
allocation is short lived.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists