On Mon, 20 Jan 2014, Wanpeng Li wrote: > >+ enum zone_type high_zoneidx = gfp_zone(flags); > > > >+ if (!node_present_pages(searchnode)) { > >+ zonelist = node_zonelist(searchnode, flags); > >+ for_each_zone_zonelist(zone, z, zonelist, high_zoneidx) { > >+ searchnode = zone_to_nid(zone); > >+ if (node_present_pages(searchnode)) > >+ break; > >+ } > >+ } > > object = get_partial_node(s, get_node(s, searchnode), c, flags); > > if (object || node != NUMA_NO_NODE) > > return object; > > > > The patch fix the bug. However, the kernel crashed very quickly after running > stress tests for a short while: This is not a good way of fixing it. How about not asking for memory from nodes that are memoryless? Use numa_mem_id() which gives you the next node that has memory instead of numa_node_id() (gives you the current node regardless if it has memory or not).