lkml.org 
[lkml]   [2015]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC v2 4/4] mm: fallback for offline nodes in alloc_pages_node
On Fri, 24 Jul 2015, Christoph Lameter wrote:

> On Fri, 24 Jul 2015, Vlastimil Babka wrote:
>
> > diff --git a/include/linux/gfp.h b/include/linux/gfp.h
> > index 531c72d..104a027 100644
> > --- a/include/linux/gfp.h
> > +++ b/include/linux/gfp.h
> > @@ -321,8 +321,12 @@ static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
> > unsigned int order)
> > {
> > /* Unknown node is current (or closest) node */
> > - if (nid == NUMA_NO_NODE)
> > + if (nid == NUMA_NO_NODE) {
> > nid = numa_mem_id();
> > + } else if (!node_online(nid)) {
> > + VM_WARN_ON(!node_online(nid));
> > + nid = numa_mem_id();
> > + }
>
> I would think you would only want this for debugging purposes. The
> overwhelming majority of hardware out there has no memory
> onlining/offlining capability after all and this adds the overhead to each
> call to alloc_pages_node.
>
> Make this dependo n CONFIG_VM_DEBUG or some such thing?
>

Yeah, the suggestion was for VM_WARN_ON() in the conditional, but the
placement has changed somewhat because of the new __alloc_pages_node(). I
think

else if (VM_WARN_ON(!node_online(nid)))
nid = numa_mem_id();

should be fine since it only triggers for CONFIG_DEBUG_VM.


\
 
 \ /
  Last update: 2015-07-24 22:21    [W:0.314 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site