mem/memcg: cache rightmost node
authorDavidlohr Bueso <[email protected]>
Fri, 8 Sep 2017 23:15:21 +0000 (16:15 -0700)
committerLinus Torvalds <[email protected]>
Sat, 9 Sep 2017 01:26:49 +0000 (18:26 -0700)
commitfa90b2fd300f38cc7b3e416974116c83f3953465
treed21f304639c4de0e67a88086fd0f988e41567250
parentb2ac2ea6296e7dd779168eb085b09d0fab9d1294
mem/memcg: cache rightmost node

Such that we can optimize __mem_cgroup_largest_soft_limit_node().  The
only overhead is the extra footprint for the cached pointer, but this
should not be an issue for mem_cgroup_tree_per_node.

[[email protected]: brain fart #2]
Link: http://lkml.kernel.org/r/[email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Davidlohr Bueso <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Vladimir Davydov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/memcontrol.c