]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: move cgroup_subsys_state parent field for cache locality
authorTodd Poynor <toddpoynor@google.com>
Fri, 7 Apr 2017 01:47:57 +0000 (18:47 -0700)
committerTejun Heo <tj@kernel.org>
Tue, 11 Apr 2017 00:06:17 +0000 (09:06 +0900)
commit3c4a3d6125a277e2d23d5c99bb2c3aaccb2efac4
tree1f64f1e97e59af97c7322df5703184032d28b2cd
parent42c3705ed791723c52ed7f258e69454113419663
cgroup: move cgroup_subsys_state parent field for cache locality

Various structures embed a struct cgroup_subsys_state, typically at
the top of the containing structure.  It is common for code that
accesses the structures to perform operations that iterate over the
chain of parent css pointers, also accessing data in each containing
structure.  In particular, struct cpuacct is used by fairly hot code
paths in the scheduler such as cpuacct_charge().

Move the parent css pointer field to the end of the structure to
increase the chances of residing in the same cache line as the data
from the containing structure.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
include/linux/cgroup-defs.h