Re: [PATCH 3/5] memcg: lru_size instead of MEM_CGROUP_ZSTAT

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

 



On Mon, 2 Jan 2012, Michal Hocko wrote:
> On Sat 31-12-11 23:30:38, Hugh Dickins wrote:
> > I never understood why we need a MEM_CGROUP_ZSTAT(mz, idx) macro
> > to obscure the LRU counts.  For easier searching?  So call it
> > lru_size rather than bare count (lru_length sounds better, but
> > would be wrong, since each huge page raises lru_size hugely).
> 
> lru_size is unique at the global scope at the moment but this might
> change in the future. MEM_CGROUP_ZSTAT should be unique and so easier
> to grep or cscope. 
> On the other hand lru_size sounds like a better name so I am all for
> renaming but we should make sure that we somehow get memcg into it
> (either to macro MEM_CGROUP_LRU_SIZE or get rid of macro and have
> memcg_lru_size field name - which is ugly long).

I do disagree.  You're asking to introduce artificial differences,
whereas generally we're trying to minimize the differences between
global and memcg.

I'm happy with the way mem_cgroup_zone_lruvec(), for example, returns
a pointer to the relevant structure, whether it's global or per-memcg,
and we then work with the contents of that structure, whichever it is:
lruvec in each case, not global_lruvec in one case and memcg_lruvec
in the other.

And certainly not GLOBAL_ZLRUVEC or MEM_CGROUP_ZLRUVEC!

Hugh

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
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]