]> git.baikalelectronics.ru Git - kernel.git/commit
mm: memcontrol: do not account memory+swap on unified hierarchy
authorJohannes Weiner <hannes@cmpxchg.org>
Thu, 14 Jan 2016 23:21:23 +0000 (15:21 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Jan 2016 00:00:49 +0000 (16:00 -0800)
commit1d72e9670c7b22eae33d185934f01288e5e98545
treeaa6dd06c9da139e587e7518a9bc9bc69c79c0847
parentb8149bea2bcd96b7a8bfe3cefd041d06c97cf4b6
mm: memcontrol: do not account memory+swap on unified hierarchy

The unified hierarchy memory controller doesn't expose the memory+swap
counter to userspace, but its accounting is hardcoded in all charge
paths right now, including the per-cpu charge cache ("the stock").

To avoid adding yet more pointless memory+swap accounting with the
socket memory support in unified hierarchy, disable the counter
altogether when in unified hierarchy mode.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Vladimir Davydov <vdavydov@virtuozzo.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c