]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mm: memcontrol: make tree_{stat,events} fetch all stats
authorVladimir Davydov <vdavydov@virtuozzo.com>
Thu, 17 Mar 2016 21:17:32 +0000 (14:17 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Mar 2016 22:09:34 +0000 (15:09 -0700)
commit72b54e7314a2e7a68567c92bbb32fe2598a3c783
tree3ab699bd18fc1c3b27224620b21a3800ed567402
parentfcff7d7eebe6d31e2ce20d994555c86a90197034
mm: memcontrol: make tree_{stat,events} fetch all stats

Currently, tree_{stat,events} helpers can only get one stat index at a
time, so when there are a lot of stats to be reported one has to call it
over and over again (see memory_stat_show).  This is neither effective,
nor does it look good.  Instead, let's make these helpers take a
snapshot of all available counters.

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