aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cgroup.h
diff options
context:
space:
mode:
authorPaul Menage <menage@google.com>2009-01-29 14:25:21 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-29 18:04:45 -0800
commit804b3c28a4e4fa1c224571bf76edb534b9c4b1ed (patch)
tree59e0dabb227a5067cfdc7cce13f149f141ef8cb4 /include/linux/cgroup.h
parent1404f06565ee89e0ce04d4a5859c00b0e3a0dc8d (diff)
downloadkernel_samsung_tuna-804b3c28a4e4fa1c224571bf76edb534b9c4b1ed.zip
kernel_samsung_tuna-804b3c28a4e4fa1c224571bf76edb534b9c4b1ed.tar.gz
kernel_samsung_tuna-804b3c28a4e4fa1c224571bf76edb534b9c4b1ed.tar.bz2
cgroups: add cpu_relax() calls in css_tryget() and cgroup_clear_css_refs()
css_tryget() and cgroup_clear_css_refs() contain polling loops; these loops should have cpu_relax calls in them to reduce cross-cache traffic. Signed-off-by: Paul Menage <menage@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r--include/linux/cgroup.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index e267e62..e4e8e11 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -99,6 +99,7 @@ static inline bool css_tryget(struct cgroup_subsys_state *css)
while (!atomic_inc_not_zero(&css->refcnt)) {
if (test_bit(CSS_REMOVED, &css->flags))
return false;
+ cpu_relax();
}
return true;
}