Commit 32a533f2 authored by Thomas Gleixner's avatar Thomas Gleixner

Merge branch 'rt/mm' into rt/base

parents e5d14981 e3cf1fe8
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
*/ */
struct page_cgroup { struct page_cgroup {
unsigned long flags; unsigned long flags;
spinlock_t lock;
struct mem_cgroup *mem_cgroup; struct mem_cgroup *mem_cgroup;
struct page *page; struct page *page;
struct list_head lru; /* per cgroup LRU list */ struct list_head lru; /* per cgroup LRU list */
...@@ -70,17 +71,17 @@ static inline enum zone_type page_cgroup_zid(struct page_cgroup *pc) ...@@ -70,17 +71,17 @@ static inline enum zone_type page_cgroup_zid(struct page_cgroup *pc)
static inline void lock_page_cgroup(struct page_cgroup *pc) static inline void lock_page_cgroup(struct page_cgroup *pc)
{ {
bit_spin_lock(PCG_LOCK, &pc->flags); spin_lock(&pc->lock);
} }
static inline int trylock_page_cgroup(struct page_cgroup *pc) static inline int trylock_page_cgroup(struct page_cgroup *pc)
{ {
return bit_spin_trylock(PCG_LOCK, &pc->flags); return spin_trylock(&pc->lock);
} }
static inline void unlock_page_cgroup(struct page_cgroup *pc) static inline void unlock_page_cgroup(struct page_cgroup *pc)
{ {
bit_spin_unlock(PCG_LOCK, &pc->flags); spin_unlock(&pc->lock);
} }
#else /* CONFIG_CGROUP_MEM_RES_CTLR */ #else /* CONFIG_CGROUP_MEM_RES_CTLR */
......
...@@ -14,6 +14,7 @@ static void __meminit ...@@ -14,6 +14,7 @@ static void __meminit
__init_page_cgroup(struct page_cgroup *pc, unsigned long pfn) __init_page_cgroup(struct page_cgroup *pc, unsigned long pfn)
{ {
pc->flags = 0; pc->flags = 0;
spin_lock_init(&pc->lock);
pc->mem_cgroup = NULL; pc->mem_cgroup = NULL;
pc->page = pfn_to_page(pfn); pc->page = pfn_to_page(pfn);
INIT_LIST_HEAD(&pc->lru); INIT_LIST_HEAD(&pc->lru);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment