aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorVladimir Davydov <[email protected]>2015-04-15 16:13:00 -0700
committerLinus Torvalds <[email protected]>2015-04-15 16:35:16 -0700
commitadbe427b92d18cf3f801e82e9cd664fbe31cea3c (patch)
treee1fe1512cd36f2b7a5a978f473be7dc9d05021fa /tools/perf/scripts/python
parentd7e4a2ea51c1b0ac0b2d53f5ab4a2e878b1c4aec (diff)
memcg: zap mem_cgroup_lookup()
mem_cgroup_lookup() is a wrapper around mem_cgroup_from_id(), which checks that id != 0 before issuing the function call. Today, there is no point in this additional check apart from optimization, because there is no css with id <= 0, so that css_from_id, called by mem_cgroup_from_id, will return NULL for any id <= 0. Since mem_cgroup_from_id is only called from mem_cgroup_lookup, let us zap mem_cgroup_lookup, substituting calls to it with mem_cgroup_from_id and moving the check if id > 0 to css_from_id. Signed-off-by: Vladimir Davydov <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: Johannes Weiner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions