]> git.baikalelectronics.ru Git - kernel.git/commit
mm: memcontrol: give the kmem states more descriptive names
authorJohannes Weiner <hannes@cmpxchg.org>
Wed, 20 Jan 2016 23:02:24 +0000 (15:02 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 21 Jan 2016 01:09:18 +0000 (17:09 -0800)
commit9cf44d9f51be4e1ff1d48e033fbcc3e81eb517ed
tree4a76642946268e850fdab5b757f9e5bfa2ea07b6
parenta9a510ad7d81cc81e65d38a392b48a56bae62a30
mm: memcontrol: give the kmem states more descriptive names

On any given memcg, the kmem accounting feature has three separate
states: not initialized, structures allocated, and actively accounting
slab memory.  These are represented through a combination of the
kmem_acct_activated and kmem_acct_active flags, which is confusing.

Convert to a kmem_state enum with the states NONE, ALLOCATED, and
ONLINE.  Then rename the functions to modify the state accordingly.
This follows the nomenclature of css object states more closely.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Tejun Heo <tj@kernel.org>
Acked-by: Vladimir Davydov <vdavydov@virtuozzo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/memcontrol.h
mm/memcontrol.c
mm/slab_common.c
mm/vmscan.c