Re: [PATCH 2/2] memcg: reap dead memcgs under pressure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/25/2013 04:50 PM, Li Zefan wrote:
>> +static void memcg_vmpressure_shrink_dead(void)
>> +{
>> +	struct memcg_cache_params *params, *tmp;
>> +	struct kmem_cache *cachep;
>> +	struct mem_cgroup *memcg;
>> +
>> +	mutex_lock(&dangling_memcgs_mutex);
>> +	list_for_each_entry(memcg, &dangling_memcgs, dead) {
>> +
>> +		mem_cgroup_get(memcg);
> 
> This mem_cgroup_get() looks redundant to me, because you're iterating the list
> and never release dangling_memcgs_mutex in the middle.
> 
You are right. We will never go all the way through free because
memcg_dangling_free is called before free, and needs the mutex.

Thanks

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]