Re: [PATCH] mm: rename and document alloc_pages_exact_node
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Christoph Lameter <cl@xxxxxxxxx>
- Subject: Re: [PATCH] mm: rename and document alloc_pages_exact_node
- From: David Rientjes <rientjes@xxxxxxxxxx>
- Date: Thu, 23 Jul 2015 13:27:15 -0700 (PDT)
- Cc: Vlastimil Babka <vbabka@xxxxxxx>, linux-mm@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, cbe-oss-dev@xxxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, Mel Gorman <mgorman@xxxxxxx>, Greg Thelen <gthelen@xxxxxxxxxx>, "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxxxxxxxxxx>, Pekka Enberg <penberg@xxxxxxxxxx>, Joonsoo Kim <iamjoonsoo.kim@xxxxxxx>, Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, Fenghua Yu <fenghua.yu@xxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Gleb Natapov <gleb@xxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Cliff Whickman <cpw@xxxxxxx>, Robin Holt <robinmholt@xxxxxxxxx>
- In-reply-to: <alpine.DEB.2.11.1507230855510.12258@east.gentwo.org>
- List-id: <linux-ia64.vger.kernel.org>
- References: <1437486951-19898-1-git-send-email-vbabka@suse.cz> <alpine.DEB.2.10.1507211428160.3833@chino.kir.corp.google.com> <55AF7F64.1040602@suse.cz> <alpine.DEB.2.10.1507221445130.21468@chino.kir.corp.google.com> <alpine.DEB.2.11.1507230855510.12258@east.gentwo.org>
- User-agent: Alpine 2.10 (DEB 1266 2009-07-14)
On Thu, 23 Jul 2015, Christoph Lameter wrote:
> > The only possible downside would be existing users of
> > alloc_pages_node() that are calling it with an offline node. Since it's a
> > VM_BUG_ON() that would catch that, I think it should be changed to a
> > VM_WARN_ON() and eventually fixed up because it's nonsensical.
> > VM_BUG_ON() here should be avoided.
>
> The offline node thing could be addresses by using numa_mem_id()?
>
I was concerned about any callers that were passing an offline node, not
NUMA_NO_NODE, today. One of the alloc-node functions has a VM_BUG_ON()
for it, the other silently calls node_zonelist() on it.
I suppose the final alloc_pages_node() implementation could be
if (nid == NUMA_NO_NODE || VM_WARN_ON(!node_online(nid)))
nid = numa_mem_id();
VM_BUG_ON(nid < 0 || nid >= MAX_NUMNODES);
return __alloc_pages(gfp_mask, order, node_zonelist(nid, gfp_mask));
though.
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]