From: Miao Xie <miaox@cn.fujitsu.com>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Paul Menage <paul@paulmenage.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [patch for-3.2-rc3] cpusets: stall when updating mems_allowed for mempolicy or disjoint nodemask
Date: Wed, 23 Nov 2011 15:49:12 +0800 [thread overview]
Message-ID: <4ECCA578.6020700@cn.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1111222210341.21009@chino.kir.corp.google.com>
On Tue, 22 Nov 2011 22:25:46 -0800 (pst), David Rientjes wrote:
> On Wed, 23 Nov 2011, Miao Xie wrote:
>
>> This is a good idea. But I worry that oom will happen easily, because we do
>> direct reclamation and compact by mems_allowed.
>>
>
> Memory compaction actually iterates through each zone regardless of
> whether it's allowed or not in the current context. Recall that the
> nodemask passed into __alloc_pages_nodemask() is non-NULL only when there
> is a mempolicy that restricts the allocations by MPOL_BIND. That nodemask
> is not protected by get_mems_allowed(), so there's no change in
> compaction's behavior with my patch.
That nodemask is also protected by get_mems_allowed().
> Direct reclaim does, however, require mems_allowed staying constant
> without the risk of early oom as you mentioned. It has its own
> get_mems_allowed(), though, so it doesn't have the opportunity to change
> until returning to the page allocator. It's possible that mems_allowed
> will be different on the next call to get_pages_from_freelist() but we
> don't know anything about that context: it's entirely possible that the
> set of new mems has an abundance of free memory or are completely depleted
> as well. So there's no strict need for consistency between the set of
> allowed nodes during reclaim and the subsequent allocation attempt. All
> we care about is that reclaim has a consistent set of allowed nodes to
> determine whether it's making progress or not.
>
Agree.
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Miao Xie <miaox@cn.fujitsu.com>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Paul Menage <paul@paulmenage.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [patch for-3.2-rc3] cpusets: stall when updating mems_allowed for mempolicy or disjoint nodemask
Date: Wed, 23 Nov 2011 15:49:12 +0800 [thread overview]
Message-ID: <4ECCA578.6020700@cn.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1111222210341.21009@chino.kir.corp.google.com>
On Tue, 22 Nov 2011 22:25:46 -0800 (pst), David Rientjes wrote:
> On Wed, 23 Nov 2011, Miao Xie wrote:
>
>> This is a good idea. But I worry that oom will happen easily, because we do
>> direct reclamation and compact by mems_allowed.
>>
>
> Memory compaction actually iterates through each zone regardless of
> whether it's allowed or not in the current context. Recall that the
> nodemask passed into __alloc_pages_nodemask() is non-NULL only when there
> is a mempolicy that restricts the allocations by MPOL_BIND. That nodemask
> is not protected by get_mems_allowed(), so there's no change in
> compaction's behavior with my patch.
That nodemask is also protected by get_mems_allowed().
> Direct reclaim does, however, require mems_allowed staying constant
> without the risk of early oom as you mentioned. It has its own
> get_mems_allowed(), though, so it doesn't have the opportunity to change
> until returning to the page allocator. It's possible that mems_allowed
> will be different on the next call to get_pages_from_freelist() but we
> don't know anything about that context: it's entirely possible that the
> set of new mems has an abundance of free memory or are completely depleted
> as well. So there's no strict need for consistency between the set of
> allowed nodes during reclaim and the subsequent allocation attempt. All
> we care about is that reclaim has a consistent set of allowed nodes to
> determine whether it's making progress or not.
>
Agree.
next prev parent reply other threads:[~2011-11-23 7:50 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-16 21:08 [patch for-3.2-rc3] cpusets: stall when updating mems_allowed for mempolicy or disjoint nodemask David Rientjes
2011-11-16 21:08 ` David Rientjes
2011-11-17 8:29 ` Miao Xie
2011-11-17 8:29 ` Miao Xie
2011-11-17 21:33 ` David Rientjes
2011-11-17 21:33 ` David Rientjes
2011-11-18 9:52 ` Miao Xie
2011-11-18 9:52 ` Miao Xie
2011-11-18 23:49 ` David Rientjes
2011-11-18 23:49 ` David Rientjes
2011-11-23 2:51 ` Miao Xie
2011-11-23 2:51 ` Miao Xie
2011-11-23 3:32 ` David Rientjes
2011-11-23 3:32 ` David Rientjes
2011-11-23 4:48 ` Miao Xie
2011-11-23 4:48 ` Miao Xie
2011-11-23 6:25 ` David Rientjes
2011-11-23 6:25 ` David Rientjes
2011-11-23 7:49 ` Miao Xie [this message]
2011-11-23 7:49 ` Miao Xie
2011-11-23 22:26 ` David Rientjes
2011-11-23 22:26 ` David Rientjes
2011-11-24 1:26 ` Miao Xie
2011-11-24 1:26 ` Miao Xie
2011-11-24 1:52 ` David Rientjes
2011-11-24 1:52 ` David Rientjes
2011-11-24 2:50 ` Miao Xie
2011-11-24 2:50 ` Miao Xie
2011-11-17 22:22 ` Andrew Morton
2011-11-17 22:22 ` Andrew Morton
2011-11-17 23:08 ` [patch v2 " David Rientjes
2011-11-17 23:08 ` David Rientjes
2011-11-18 0:00 ` Andrew Morton
2011-11-18 0:00 ` Andrew Morton
2011-11-18 23:53 ` David Rientjes
2011-11-18 23:53 ` David Rientjes
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=4ECCA578.6020700@cn.fujitsu.com \
--to=miaox@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=paul@paulmenage.org \
--cc=rientjes@google.com \
--cc=torvalds@linux-foundation.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 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.