linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	linux-mm@kvack.org
Subject: Re: [PATCH mmotm] memcg: avoid reclaim_stat oops when disabled
Date: Tue, 23 Dec 2008 10:23:56 +0900	[thread overview]
Message-ID: <20081223102356.27faab7b.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0812230116210.20371@blonde.anvils>

On Tue, 23 Dec 2008 01:24:56 +0000 (GMT)
Hugh Dickins <hugh@veritas.com> wrote:

> mem_cgroup_get_reclaim_stat_from_page() oopses in page_cgroup_zoneinfo()
> when you boot with cgroup_disabled=memory: it needs to check for that.
> 
> Signed-off-by: Hugh Dickins <hugh@veritas.com>

Oh, thanks.

Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

> ---
> Follow memcg-add-zone_reclaim_stat-reclaim-stat-trivial-fixes.patch
> 
>  mm/memcontrol.c |    9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> --- mmotm/mm/memcontrol.c	2008-12-16 18:05:31.000000000 +0000
> +++ fixed/mm/memcontrol.c	2008-12-16 19:30:02.000000000 +0000
> @@ -496,9 +496,14 @@ struct zone_reclaim_stat *mem_cgroup_get
>  struct zone_reclaim_stat *
>  mem_cgroup_get_reclaim_stat_from_page(struct page *page)
>  {
> -	struct page_cgroup *pc = lookup_page_cgroup(page);
> -	struct mem_cgroup_per_zone *mz = page_cgroup_zoneinfo(pc);
> +	struct page_cgroup *pc;
> +	struct mem_cgroup_per_zone *mz;
>  
> +	if (mem_cgroup_disabled())
> +		return NULL;
> +
> +	pc = lookup_page_cgroup(page);
> +	mz = page_cgroup_zoneinfo(pc);
>  	if (!mz)
>  		return NULL;
>  
> 
> --
> 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>
> 

--
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>

  reply	other threads:[~2008-12-23  1:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-23  1:24 Hugh Dickins
2008-12-23  1:23 ` KAMEZAWA Hiroyuki [this message]
2008-12-23  1:29 ` KOSAKI Motohiro

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=20081223102356.27faab7b.kamezawa.hiroyu@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=hugh@veritas.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox