[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180324160901.512135-1-tj@kernel.org>
Date: Sat, 24 Mar 2018 09:08:58 -0700
From: Tejun Heo <tj@...nel.org>
To: hannes@...xchg.org, mhocko@...nel.org, vdavydov.dev@...il.com
Cc: guro@...com, riel@...riel.com, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org, kernel-team@...com,
cgroups@...r.kernel.org, linux-mm@...ck.org
Subject: [PATCHSET] mm, memcontrol: Make cgroup_rstat available to controllers
Hello,
Since a983b5ebee57 ("mm: memcontrol: fix excessive complexity in
memory.stat reporting"), memcg uses percpu batch-overflowing for all
stat accounting. While the propagation delay is okay for statistics,
it doesn't work for events. If a notification for an event is sent
out, the relevant counter must reflect the event when read afterwards.
With the percpu batching, it's easy to miss, for example, an oom or
oom_kill event because it's still buffered in one of the percpu
counters.
cgroup already has a mechanism to efficiently handle hierarchical
statistics in a scalable manner, cgroup_rstat, and it now can be used
by controllers.
This patchset addresses the forementioned problem by converting event
accounting to cgroup_rstat. While the stat part isn't broken, it's
also converted for consistency and a few other benefits. Also, while
trying to convert lruvec_stat, I found out that it has no users.
Remove it too (not sure whether it's needed for some non-obvious
reasons tho).
0001-mm-memcontrol-Use-cgroup_rstat-for-event-accounting.patch
0002-mm-memcontrol-Use-cgroup_rstat-for-stat-accounting.patch
0003-mm-memcontrol-Remove-lruvec_stat.patch
This patchset is on top of the "cgroup/for-4.17: Make cgroup_rstat
available to controllers" patchset[1] and also available in the
following git branch.
git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-cgroup_rstat
diffstat follows.
include/linux/memcontrol.h | 131 ++++++++++++------------
mm/memcontrol.c | 238 ++++++++++++++++++++-------------------------
mm/vmscan.c | 4
3 files changed, 180 insertions(+), 193 deletions(-)
Thanks.
--
tejun
[1] http://lkml.kernel.org/r/20180323231313.1254142-1-tj@kernel.org
Powered by blists - more mailing lists