lkml.org 
[lkml]   [2016]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH rebase] mm: fix vm-scalability regression in cgroup-aware workingset code
Hi Michal,

[sorry for the delay, I was traveling with no connectivity]

On Mon, Jun 27, 2016 at 03:05:28PM +0200, Michal Hocko wrote:
> On Fri 24-06-16 13:51:01, Johannes Weiner wrote:
>
> Acked-by: Michal Hocko <mhocko@suse.com>

Thanks!

> Minor note below
>
> > +static inline struct mem_cgroup *page_memcg_rcu(struct page *page)
> > +{
>
> I guess rcu_read_lock_held() here would be appropriate
>
> > + return READ_ONCE(page->mem_cgroup);

Agreed.

Andrew, could you please fold this?

From ed49e364e47c933d84533a0d8bd355831b5ca9f1 Mon Sep 17 00:00:00 2001
From: Johannes Weiner <hannes@cmpxchg.org>
Date: Thu, 7 Jul 2016 15:38:26 -0400
Subject: [PATCH] mm: fix vm-scalability regression in cgroup-aware workingset
code fix

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
---
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
\
 
 \ /
  Last update: 2016-07-07 22:21    [W:0.064 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site