WSL2-Linux-Kernel/include
Tejun Heo b11cfb5807 cgroup: record ancestor IDs and reimplement cgroup_is_descendant() using it
cgroup_is_descendant() currently walks up the hierarchy and compares
each ancestor to the cgroup in question.  While enough for cgroup core
usages, this can't be used in hot paths to test cgroup membership.
This patch adds cgroup->ancestor_ids[] which records the IDs of all
ancestors including self and cgroup->level for the nesting level.

This allows testing whether a given cgroup is a descendant of another
in three finite steps - testing whether the two belong to the same
hierarchy, whether the descendant candidate is at the same or a higher
level than the ancestor and comparing the recorded ancestor_id at the
matching level.  cgroup_is_descendant() is accordingly reimplmented
and made inline.

Signed-off-by: Tejun Heo <tj@kernel.org>
2015-11-20 15:55:52 -05:00
..
acpi
asm-generic h8300 update for v4.4 2015-11-12 15:26:39 -08:00
clocksource
crypto
drm
dt-bindings
keys
kvm
linux cgroup: record ancestor IDs and reimplement cgroup_is_descendant() using it 2015-11-20 15:55:52 -05:00
math-emu
media
memory
misc
net
pcmcia
ras
rdma
rxrpc
scsi
soc
sound
target Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-11-13 20:04:17 -08:00
trace
uapi VFIO updates for v4.4-rc1 2015-11-13 17:05:32 -08:00
video
xen
Kbuild