Re: [PATCH v6 26/29] Aggregate memcg cache values in slabinfo

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

 



On Thu,  1 Nov 2012 16:07:42 +0400
Glauber Costa <glommer@xxxxxxxxxxxxx> wrote:

> When we create caches in memcgs, we need to display their usage
> information somewhere. We'll adopt a scheme similar to /proc/meminfo,
> with aggregate totals shown in the global file, and per-group
> information stored in the group itself.
> 
> For the time being, only reads are allowed in the per-group cache.
> 
> ...
>
> +#define for_each_memcg_cache_index(_idx)	\
> +	for ((_idx) = 0; i < memcg_limited_groups_array_size; (_idx)++)

Use of this requires slab_mutex, yes?

Please add a comment, and confirm that all callers do indeed hold the
correct lock.


We could add a mutex_is_locked() check to the macro perhaps, but this
isn't the place to assume the presence of slab_mutex, so it gets messy.

>
> ...
>

--
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]