]> git.karo-electronics.de Git - karo-tx-linux.git/commit
memcg: replace __always_inline with plain inline
authorGlauber Costa <glommer@parallels.com>
Thu, 29 Nov 2012 03:16:37 +0000 (14:16 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 5 Dec 2012 05:22:56 +0000 (16:22 +1100)
commitab82f74f6c72b02244f61bb85f66565fb89aac27
tree1199f064aefd9da2af8b4c1258d3caf656bad7c0
parentcb67256ebea8458aebe7a20cb6010381e3d66015
memcg: replace __always_inline with plain inline

Following the pattern found in the allocators, where we do our best to the
fast paths function-call free, all the externally visible functions for
kmemcg were marked __always_inline.

It is fair to say, however, that this should be up to the compiler.  We
will still keep as much of the flag testing as we can in memcontrol.h to
give the compiler the option to inline it, but won't force it.

I tested this with 4.7.2, it will inline all three functions anyway when
compiling with -O2, and will refrain from it when compiling with -Os.
This seems like a good behavior.

Signed-off-by: Glauber Costa <glommer@parallels.com>
Cc: Michal Hocko <mhocko@suse.cz>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/memcontrol.h