[lkml]   [2018]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCHSET] mm, memcontrol: Make cgroup_rstat available to controllers

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

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).


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:// 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(-)




 \ /
  Last update: 2018-03-24 17:10    [W:0.092 / U:35.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site