aboutsummaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-08-19 09:56:42 +0200
committerSteven Rostedt <rostedt@rostedt.homelinux.com>2013-09-08 11:01:41 -0400
commit910d1b90a83eb5af096947a3fdef311b6f4ddde9 (patch)
tree06210d2810db0a51f8f5b3172206f17e6a39dadb /mm
parent1172cb3919de20633417712ef256679fddc81615 (diff)
mm: Replace cgroup_page bit spinlock
Bit spinlocks are not working on RT. Replace them. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'mm')
-rw-r--r--mm/page_cgroup.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
index 5ddad0c6daa6..c4bcdea3773e 100644
--- a/mm/page_cgroup.c
+++ b/mm/page_cgroup.c
@@ -13,6 +13,14 @@
static unsigned long total_usage;
+static void page_cgroup_lock_init(struct page_cgroup *pc, int nr_pages)
+{
+#ifdef CONFIG_PREEMPT_RT_BASE
+ for (; nr_pages; nr_pages--, pc++)
+ spin_lock_init(&pc->pcg_lock);
+#endif
+}
+
#if !defined(CONFIG_SPARSEMEM)
@@ -60,6 +68,7 @@ static int __init alloc_node_page_cgroup(int nid)
return -ENOMEM;
NODE_DATA(nid)->node_page_cgroup = base;
total_usage += table_size;
+ page_cgroup_lock_init(base, nr_pages);
return 0;
}
@@ -150,6 +159,8 @@ static int __meminit init_section_page_cgroup(unsigned long pfn, int nid)
return -ENOMEM;
}
+ page_cgroup_lock_init(base, PAGES_PER_SECTION);
+
/*
* The passed "pfn" may not be aligned to SECTION. For the calculation
* we need to apply a mask.