From: David Rientjes Date: Wed, 12 Dec 2012 21:51:57 +0000 (-0800) Subject: mm, memcg: avoid unnecessary function call when memcg is disabled X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~33^2~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68ae564bbac8eb9ed54ddd2529b0e29ee190b355;p=pandora-kernel.git mm, memcg: avoid unnecessary function call when memcg is disabled While profiling numa/core v16 with cgroup_disable=memory on the command line, I noticed mem_cgroup_count_vm_event() still showed up as high as 0.60% in perftop. This occurs because the function is called extremely often even when memcg is disabled. To fix this, inline the check for mem_cgroup_disabled() so we avoid the unnecessary function call if memcg is disabled. Signed-off-by: David Rientjes Acked-by: KAMEZAWA Hiroyuki Acked-by: Glauber Costa Acked-by: Michal Hocko Acked-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed