summaryrefslogtreecommitdiff
path: root/include/dt-bindings/pinctrl/rockchip.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2015-11-20 15:55:52 -0500
committerTejun Heo <tj@kernel.org>2015-11-20 15:55:52 -0500
commitb11cfb5807e30333b36c02701382b820b7dcf0d5 (patch)
treeaaa95e1c7d936e722fd3d9f9cbf72fe1b0890787 /include/dt-bindings/pinctrl/rockchip.h
parent8005c49d9aea74d382f474ce11afbbc7d7130bec (diff)
downloadlwn-b11cfb5807e30333b36c02701382b820b7dcf0d5.tar.gz
lwn-b11cfb5807e30333b36c02701382b820b7dcf0d5.zip
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>
Diffstat (limited to 'include/dt-bindings/pinctrl/rockchip.h')
0 files changed, 0 insertions, 0 deletions