All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Michal Hocko <mhocko@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Ye Xiaolong <xiaolong.ye@intel.com>,
	Vladimir Davydov <vdavydov@virtuozzo.com>,
	linux-mm@kvack.org, cgroups@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH rebase] mm: fix vm-scalability regression in cgroup-aware workingset code
Date: Thu, 7 Jul 2016 15:40:24 -0400	[thread overview]
Message-ID: <20160707194024.GA26580@cmpxchg.org> (raw)
In-Reply-To: <20160627130527.GK31799@dhcp22.suse.cz>

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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Johannes Weiner <hannes@cmpxchg.org>
To: Michal Hocko <mhocko@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Ye Xiaolong <xiaolong.ye@intel.com>,
	Vladimir Davydov <vdavydov@virtuozzo.com>,
	linux-mm@kvack.org, cgroups@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH rebase] mm: fix vm-scalability regression in cgroup-aware workingset code
Date: Thu, 7 Jul 2016 15:40:24 -0400	[thread overview]
Message-ID: <20160707194024.GA26580@cmpxchg.org> (raw)
In-Reply-To: <20160627130527.GK31799@dhcp22.suse.cz>

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?

WARNING: multiple messages have this Message-ID (diff)
From: Johannes Weiner <hannes@cmpxchg.org>
To: Michal Hocko <mhocko@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Ye Xiaolong <xiaolong.ye@intel.com>,
	Vladimir Davydov <vdavydov@virtuozzo.com>,
	linux-mm@kvack.org, cgroups@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH rebase] mm: fix vm-scalability regression in cgroup-aware workingset code
Date: Thu, 7 Jul 2016 15:40:24 -0400	[thread overview]
Message-ID: <20160707194024.GA26580@cmpxchg.org> (raw)
In-Reply-To: <20160627130527.GK31799@dhcp22.suse.cz>

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

  reply	other threads:[~2016-07-07 19:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22 18:20 [PATCH] mm: fix vm-scalability regression in cgroup-aware workingset code Johannes Weiner
2016-06-22 18:20 ` Johannes Weiner
2016-06-22 18:20 ` Johannes Weiner
     [not found] ` <20160622182019.24064-1-hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2016-06-24 17:51   ` [PATCH rebase] " Johannes Weiner
2016-06-24 17:51     ` Johannes Weiner
2016-06-24 17:51     ` Johannes Weiner
2016-06-27 13:05     ` Michal Hocko
2016-06-27 13:05       ` Michal Hocko
2016-07-07 19:40       ` Johannes Weiner [this message]
2016-07-07 19:40         ` Johannes Weiner
2016-07-07 19:40         ` Johannes Weiner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160707194024.GA26580@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=vdavydov@virtuozzo.com \
    --cc=xiaolong.ye@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.