linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Minchan Kim <minchan@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@suse.de>, Rik van Riel <riel@redhat.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [patch] mm, thp: abort compaction if migration page cannot be charged to memcg
Date: Thu, 21 Jun 2012 03:16:36 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1206210310030.15747@chino.kir.corp.google.com> (raw)
In-Reply-To: <4FE2F1DA.8030608@jp.fujitsu.com>

On Thu, 21 Jun 2012, Kamezawa Hiroyuki wrote:

> I guess the best way will be never calling charge/uncharge at migration.
> ....but it has been a battle with many race conditions..
> 
> Here is an alternative way, remove -ENOMEM in mem_cgroup_prepare_migration()
> by using res_counter_charge_nofail().
> 
> Could you try this ?

I would love to be able to remove the -ENOMEM as the result of charging 
the temporary page, but what happens if all cpus are calling into 
migrate_pages() that are unmapping pages from the same memcg?  This need 
not only be happening from compaction, either.  It feels like this 
wouldn't scale appropriately and you risk going significantly over the 
limit even for a brief enough period of time.  I'd hate to be 128K over my 
limit on a machine with 32 cores.

Comments from the memcg folks on if this is acceptable?

In the interim, do you have an objection to merging this patch as bandaid 
for stable?

--
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:[~2012-06-21 10:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-21  6:52 David Rientjes
2012-06-21  8:11 ` Minchan Kim
2012-06-21  8:30   ` David Rientjes
2012-06-21  9:01     ` David Rientjes
2012-06-21 10:05       ` Kamezawa Hiroyuki
2012-06-21 10:16         ` David Rientjes [this message]
2012-06-21  9:32 ` Mel Gorman
2012-06-21  9:57   ` David Rientjes
2012-06-25 20:40 ` Rik van Riel
2012-06-26  0:32   ` David Rientjes
2012-06-26  3:11     ` Kamezawa Hiroyuki

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=alpine.DEB.2.00.1206210310030.15747@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=minchan@kernel.org \
    --cc=riel@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox