From: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: David Rientjes <rientjes@google.com>
Cc: Rik van Riel <riel@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Mel Gorman <mgorman@suse.de>, Minchan Kim <minchan@kernel.org>,
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: Tue, 26 Jun 2012 12:11:11 +0900 [thread overview]
Message-ID: <4FE9284F.5040001@jp.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1206251726040.1895@chino.kir.corp.google.com>
(2012/06/26 9:32), David Rientjes wrote:
> On Mon, 25 Jun 2012, Rik van Riel wrote:
>
>> The patch makes sense, however I wonder if it would make
>> more sense in the long run to allow migrate/compaction to
>> temporarily exceed the memcg memory limit for a cgroup,
>> because the original page will get freed again soon anyway.
>>
>> That has the potential to improve compaction success, and
>> reduce compaction related CPU use.
>>
>
> Yeah, Kame brought up the same point with a sample patch by allowing the
> temporary charge for the new page. It would certainly solve this problem
> in a way that we don't have to even touch compaction, it's disappointing
> that we have to charge memory to do a page migration. I'm not so sure
> about the approach of temporarily allowing the excess charge, however,
> since it would scale with the number of cpus doing compaction or
> migration, which could end up with PAGE_SIZE * nr_cpu_ids.
>
I don't think it's problem. Even if there are 4096 cpus, it's only 16MB
on that system, which tends to have terabytes of memory.
(We already have 32pages of per-cpu-cache....)
I'd like to post that patch with updating to mmotm.
> I haven't looked at it (yet), but I'm hoping that there's a way to avoid
> charging the temporary page at all until after move_to_new_page()
> succeeds, i.e. find a way to uncharge page before charging newpage.
Hmm...this code has been verrry racy and we did many mis-accounting.
So, I'd like to start from a safe way.
THanks,
-Kame
--
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>
prev parent reply other threads:[~2012-06-26 3:14 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
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 [this message]
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=4FE9284F.5040001@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=minchan@kernel.org \
--cc=riel@redhat.com \
--cc=rientjes@google.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