[PATCH] mm: fix vm-scalability regression in cgroup-aware workingset code fix
From: Johannes Weiner
Date: Thu Jul 07 2016 - 15:38:26 EST
Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx>
---
include/linux/mm.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index b21e5f30378e..97065e1f0237 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -975,6 +975,7 @@ static inline struct mem_cgroup *page_memcg(struct page *page)
}
static inline struct mem_cgroup *page_memcg_rcu(struct page *page)
{
+ WARN_ON_ONCE(!rcu_read_lock_held());
return READ_ONCE(page->mem_cgroup);
}
#else
@@ -984,6 +985,7 @@ static inline struct mem_cgroup *page_memcg(struct page *page)
}
static inline struct mem_cgroup *page_memcg_rcu(struct page *page)
{
+ WARN_ON_ONCE(!rcu_read_lock_held());
return NULL;
}
#endif
--
2.9.0