summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-08-19 07:56:42 (GMT)
committerScott Wood <scottwood@freescale.com>2014-05-14 18:37:58 (GMT)
commitd91d3eed3e280bc9fc567781d6291a5ae989bd12 (patch)
treeddd57a818326693ed9676e1362dce88876d43ffa /include/linux
parent0d758b5e66a94de6a6ccc333a64563b10b610677 (diff)
downloadlinux-fsl-qoriq-d91d3eed3e280bc9fc567781d6291a5ae989bd12.tar.xz
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 'include/linux')
-rw-r--r--include/linux/page_cgroup.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h
index 777a524..ca67e80 100644
--- a/include/linux/page_cgroup.h
+++ b/include/linux/page_cgroup.h
@@ -24,6 +24,9 @@ enum {
*/
struct page_cgroup {
unsigned long flags;
+#ifdef CONFIG_PREEMPT_RT_BASE
+ spinlock_t pcg_lock;
+#endif
struct mem_cgroup *mem_cgroup;
};
@@ -74,12 +77,20 @@ static inline void lock_page_cgroup(struct page_cgroup *pc)
* Don't take this lock in IRQ context.
* This lock is for pc->mem_cgroup, USED, MIGRATION
*/
+#ifndef CONFIG_PREEMPT_RT_BASE
bit_spin_lock(PCG_LOCK, &pc->flags);
+#else
+ spin_lock(&pc->pcg_lock);
+#endif
}
static inline void unlock_page_cgroup(struct page_cgroup *pc)
{
+#ifndef CONFIG_PREEMPT_RT_BASE
bit_spin_unlock(PCG_LOCK, &pc->flags);
+#else
+ spin_unlock(&pc->pcg_lock);
+#endif
}
#else /* CONFIG_MEMCG */
@@ -102,6 +113,10 @@ static inline void __init page_cgroup_init_flatmem(void)
{
}
+static inline void page_cgroup_lock_init(struct page_cgroup *pc)
+{
+}
+
#endif /* CONFIG_MEMCG */
#include <linux/swap.h>