All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Mel Gorman <mgorman@suse.de>,
	David Rientjes <rientjes@google.com>,
	Greg Thelen <gthelen@google.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	Christoph Lameter <cl@linux.com>,
	Pekka Enberg <penberg@kernel.org>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	cbe-oss-dev@lists.ozlabs.org, kvm@vger.kernel.org,
	Mel Gorman <mgorman@techsingularity.net>
Subject: Re: [PATCH v3 3/3] mm: use numa_mem_id() in alloc_pages_node()
Date: Thu, 06 Aug 2015 07:00:05 +0000	[thread overview]
Message-ID: <55C305F5.8050005@suse.cz> (raw)
In-Reply-To: <20150730174112.GC15257@cmpxchg.org>

On 07/30/2015 07:41 PM, Johannes Weiner wrote:
> On Thu, Jul 30, 2015 at 06:34:31PM +0200, Vlastimil Babka wrote:
>> numa_mem_id() is able to handle allocation from CPUs on memory-less nodes,
>> so it's a more robust fallback than the currently used numa_node_id().
>
> Won't it fall through to the next closest memory node in the zonelist
> anyway?

Right, I would expect the zonelist of memoryless node to be the same as 
of the closest node. Documentation/vm/numa seems to agree.

Is this for callers doing NUMA_NO_NODE with __GFP_THISZONE?

I guess that's the only scenario where that matters, yeah. And there 
might well be no such caller now, but maybe some will sneak in without 
the author testing on a system with memoryless node.

Note that with !CONFIG_HAVE_MEMORYLESS_NODES, numa_mem_id() just does 
numa_node_id().

So yeah I think "a more robust fallback" is correct :) But let's put it 
explicitly in changelog then:

----8<----

alloc_pages_node() might fail when called with NUMA_NO_NODE and 
__GFP_THISNODE on a CPU belonging to a memoryless node. To make the 
local-node fallback more robust and prevent such situations, use 
numa_mem_id(), which was introduced for similar scenarios in the slab 
context.

WARNING: multiple messages have this Message-ID (diff)
From: Vlastimil Babka <vbabka@suse.cz>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Mel Gorman <mgorman@suse.de>,
	David Rientjes <rientjes@google.com>,
	Greg Thelen <gthelen@google.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	Christoph Lameter <cl@linux.com>,
	Pekka Enberg <penberg@kernel.org>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	cbe-oss-dev@lists.ozlabs.org, kvm@vger.kernel.org,
	Mel Gorman <mgorman@techsingularity.net>
Subject: Re: [PATCH v3 3/3] mm: use numa_mem_id() in alloc_pages_node()
Date: Thu, 6 Aug 2015 09:00:05 +0200	[thread overview]
Message-ID: <55C305F5.8050005@suse.cz> (raw)
In-Reply-To: <20150730174112.GC15257@cmpxchg.org>

On 07/30/2015 07:41 PM, Johannes Weiner wrote:
> On Thu, Jul 30, 2015 at 06:34:31PM +0200, Vlastimil Babka wrote:
>> numa_mem_id() is able to handle allocation from CPUs on memory-less nodes,
>> so it's a more robust fallback than the currently used numa_node_id().
>
> Won't it fall through to the next closest memory node in the zonelist
> anyway?

Right, I would expect the zonelist of memoryless node to be the same as 
of the closest node. Documentation/vm/numa seems to agree.

Is this for callers doing NUMA_NO_NODE with __GFP_THISZONE?

I guess that's the only scenario where that matters, yeah. And there 
might well be no such caller now, but maybe some will sneak in without 
the author testing on a system with memoryless node.

Note that with !CONFIG_HAVE_MEMORYLESS_NODES, numa_mem_id() just does 
numa_node_id().

So yeah I think "a more robust fallback" is correct :) But let's put it 
explicitly in changelog then:

----8<----

alloc_pages_node() might fail when called with NUMA_NO_NODE and 
__GFP_THISNODE on a CPU belonging to a memoryless node. To make the 
local-node fallback more robust and prevent such situations, use 
numa_mem_id(), which was introduced for similar scenarios in the slab 
context.

WARNING: multiple messages have this Message-ID (diff)
From: Vlastimil Babka <vbabka@suse.cz>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Mel Gorman <mgorman@suse.de>,
	David Rientjes <rientjes@google.com>,
	Greg Thelen <gthelen@google.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	Christoph Lameter <cl@linux.com>,
	Pekka Enberg <penberg@kernel.org>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	cbe-oss-dev@lists.ozlabs.org, kvm@vger.kernel.org,
	Mel Gorman <mgorman@techsingularity.net>
Subject: Re: [PATCH v3 3/3] mm: use numa_mem_id() in alloc_pages_node()
Date: Thu, 6 Aug 2015 09:00:05 +0200	[thread overview]
Message-ID: <55C305F5.8050005@suse.cz> (raw)
In-Reply-To: <20150730174112.GC15257@cmpxchg.org>

On 07/30/2015 07:41 PM, Johannes Weiner wrote:
> On Thu, Jul 30, 2015 at 06:34:31PM +0200, Vlastimil Babka wrote:
>> numa_mem_id() is able to handle allocation from CPUs on memory-less nodes,
>> so it's a more robust fallback than the currently used numa_node_id().
>
> Won't it fall through to the next closest memory node in the zonelist
> anyway?

Right, I would expect the zonelist of memoryless node to be the same as 
of the closest node. Documentation/vm/numa seems to agree.

Is this for callers doing NUMA_NO_NODE with __GFP_THISZONE?

I guess that's the only scenario where that matters, yeah. And there 
might well be no such caller now, but maybe some will sneak in without 
the author testing on a system with memoryless node.

Note that with !CONFIG_HAVE_MEMORYLESS_NODES, numa_mem_id() just does 
numa_node_id().

So yeah I think "a more robust fallback" is correct :) But let's put it 
explicitly in changelog then:

----8<----

alloc_pages_node() might fail when called with NUMA_NO_NODE and 
__GFP_THISNODE on a CPU belonging to a memoryless node. To make the 
local-node fallback more robust and prevent such situations, use 
numa_mem_id(), which was introduced for similar scenarios in the slab 
context.

--
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:[~2015-08-06  7:00 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30 16:34 [PATCH v3 1/3] mm: rename alloc_pages_exact_node to __alloc_pages_node Vlastimil Babka
2015-07-30 16:34 ` Vlastimil Babka
2015-07-30 16:34 ` Vlastimil Babka
2015-07-30 16:34 ` Vlastimil Babka
2015-07-30 16:34 ` [PATCH v3 2/3] mm: unify checks in alloc_pages_node() and __alloc_pages_node() Vlastimil Babka
2015-07-30 16:34   ` Vlastimil Babka
2015-07-30 16:34   ` Vlastimil Babka
2015-07-30 17:35   ` Johannes Weiner
2015-07-30 17:35     ` Johannes Weiner
2015-07-30 17:35     ` Johannes Weiner
2015-07-30 17:59   ` Christoph Lameter
2015-07-30 17:59     ` Christoph Lameter
2015-07-30 17:59     ` Christoph Lameter
2015-07-30 16:34 ` [PATCH v3 3/3] mm: use numa_mem_id() in alloc_pages_node() Vlastimil Babka
2015-07-30 16:34   ` Vlastimil Babka
2015-07-30 16:34   ` Vlastimil Babka
2015-07-30 17:41   ` Johannes Weiner
2015-07-30 17:41     ` Johannes Weiner
2015-07-30 17:41     ` Johannes Weiner
2015-08-06  7:00     ` Vlastimil Babka [this message]
2015-08-06  7:00       ` Vlastimil Babka
2015-08-06  7:00       ` Vlastimil Babka
2015-07-30 17:59   ` Christoph Lameter
2015-07-30 17:59     ` Christoph Lameter
2015-07-30 17:59     ` Christoph Lameter
2015-07-30 17:33 ` [PATCH v3 1/3] mm: rename alloc_pages_exact_node to __alloc_pages_node Johannes Weiner
2015-07-30 17:33   ` Johannes Weiner
2015-07-30 17:33   ` Johannes Weiner
2015-07-30 17:33   ` Johannes Weiner
2015-07-30 17:58 ` Christoph Lameter
2015-07-30 17:58   ` Christoph Lameter
2015-07-30 17:58   ` Christoph Lameter
2015-07-30 17:58   ` Christoph Lameter
2015-07-30 19:59   ` Vlastimil Babka
2015-07-30 19:59     ` Vlastimil Babka
2015-07-30 19:59     ` Vlastimil Babka
2015-07-30 19:59     ` Vlastimil Babka
2015-07-30 20:07     ` Christoph Lameter
2015-07-30 20:07       ` Christoph Lameter
2015-07-30 20:07       ` Christoph Lameter
2015-07-30 20:07       ` Christoph Lameter
2015-07-31 21:25     ` David Rientjes
2015-07-31 21:25       ` David Rientjes
2015-07-31 21:25       ` David Rientjes
2015-07-31 21:25       ` David Rientjes
2015-07-31 21:45       ` Vlastimil Babka
2015-07-31 21:45         ` Vlastimil Babka
2015-07-31 21:45         ` Vlastimil Babka
2015-07-31 21:45         ` Vlastimil Babka

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=55C305F5.8050005@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=cbe-oss-dev@lists.ozlabs.org \
    --cc=cl@linux.com \
    --cc=gthelen@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mgorman@suse.de \
    --cc=mgorman@techsingularity.net \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=penberg@kernel.org \
    --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 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.