linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.cz>
To: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Subject: Re: [PATCH mmotm,next] mm: fix memcg-less page reclaim
Date: Mon, 19 Aug 2013 11:51:36 +0200	[thread overview]
Message-ID: <20130819095136.GB3396@dhcp22.suse.cz> (raw)
In-Reply-To: <20130819074407.GA3396@dhcp22.suse.cz>

[Let's CC Johannes, Kamezewa and Kosaki]

On Mon 19-08-13 09:44:07, Michal Hocko wrote:
> On Sun 18-08-13 23:05:25, Hugh Dickins wrote:
[...]
> > Adding mem_cgroup_disabled() and once++ test there is ugly.  Ideally,
> > even a !CONFIG_MEMCG build might in future have a stub root_mem_cgroup,
> > which would get around this: but that's not so at present.
> > 
> > However, it appears that nothing actually dereferences the memcg pointer
> > in the mem_cgroup_disabled() case, here or anywhere else that case can
> > reach mem_cgroup_iter() (mem_cgroup_iter_break() is not called in
> > global reclaim).
> > 
> > So, simply pass back an ordinarily-oopsing non-NULL address the first
> > time, and we shall hear about it if I'm wrong.
> 
> This is a bit tricky but it seems like the easiest way for now. I will
> look at the fake root cgroup for !CONFIG_MEMCG.

OK, the following builds for both CONFIG_MEMCG enabled and disabled and
should work with cgroup_disable=memory as well as we are allocating
root_mem_cgroup for disabled case as well AFAICS.

It looks less scary than I expected. I haven't tested it yet but if you
think that it looks promising I will send a full patch with changelog.
---

  reply	other threads:[~2013-08-19  9:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-19  6:05 Hugh Dickins
2013-08-19  7:44 ` Michal Hocko
2013-08-19  9:51   ` Michal Hocko [this message]
2013-08-19 15:45     ` Johannes Weiner
2013-08-20  8:17       ` Michal Hocko
2013-08-19 19:28     ` Hugh Dickins
2013-08-20  8:14       ` Michal Hocko

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=20130819095136.GB3396@dhcp22.suse.cz \
    --to=mhocko@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.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