Re: [patch] mm, thp: only collapse hugepages to nodes with affinity

2014-07-15 Thread David Rientjes
On Mon, 14 Jul 2014, Dave Hansen wrote: > > + if (node == NUMA_NO_NODE) { > > + node = page_to_nid(page); > > + } else { > > + int distance = node_distance(page_to_nid(page), node); > > + > > + /* > > +*

Re: [patch] mm, thp: only collapse hugepages to nodes with affinity

2014-07-14 Thread Dave Hansen
On 07/14/2014 06:09 PM, David Rientjes wrote: > + if (node == NUMA_NO_NODE) { > + node = page_to_nid(page); > + } else { > + int distance = node_distance(page_to_nid(page), node); > + > + /* > +

[patch] mm, thp: only collapse hugepages to nodes with affinity

2014-07-14 Thread David Rientjes
Commit 9f1b868a13ac ("mm: thp: khugepaged: add policy for finding target node") improved the previous khugepaged logic which allocated a transparent hugepages from the node of the first page being collapsed. However, it is still possible to collapse pages to remote memory which may suffer from