Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1438916
| From | Johannes Weiner <hannes@cmpxchg.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH rebase] mm: fix vm-scalability regression in cgroup-aware workingset code |
| Date | 2016-07-07 21:50 +0200 |
| Message-ID | <rSnt8-2ST-21@gated-at.bofh.it> (permalink) |
| References | <rMV4t-6Zs-17@gated-at.bofh.it> <rNDyx-2TA-13@gated-at.bofh.it> <rOEsy-DU-55@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH rebase] mm: fix vm-scalability regression in cgroup-aware workingset code Johannes Weiner <hannes@cmpxchg.org> - 2016-06-24 20:00 +0200
Re: [PATCH rebase] mm: fix vm-scalability regression in cgroup-aware workingset code Michal Hocko <mhocko@kernel.org> - 2016-06-27 15:10 +0200
Re: [PATCH rebase] mm: fix vm-scalability regression in cgroup-aware workingset code Johannes Weiner <hannes@cmpxchg.org> - 2016-07-07 21:50 +0200
csiph-web