lkml.org 
[lkml]   [2014]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch v2] mm, tmp: only collapse hugepages to nodes with affinity for zone_reclaim_mode
On Wed, 16 Jul 2014, Vlastimil Babka wrote:

> >> @@ -2545,6 +2571,11 @@ static int khugepaged_scan_pmd(struct mm_struct *mm,
> >> * hit record.
> >> */
> >> node = page_to_nid(page);
> >> + if (node != last_node) {
> >> + if (khugepaged_scan_abort(node))
> >> + goto out_unmap;
> >
> > Nitpick: How about not break the loop but only reset the related
> > khugepaged_node_load[] to zero. E.g. modify khugepaged_scan_abort() like
> > this:
> > if (node_distance(nid, i) > RECLAIM_DISTANCE)
> > khugepaged_node_load[i] = 0;
> >
> > By this way, we may have a chance to find a more suitable node.
>
> Hm theoretically there might be a suitable node, but this approach wouldn't
> work. By resetting it to zero you forget that there ever was node 'i'. If there
> is no more base page from node 'i', the load remains zero and the next call with
> 'nid' will think that 'nid' is OK.
>

Right, the suggestion is wrong because we do not want to ever collapse to
a node when the distance from the source page is > RECLAIM_DISTANCE,
that's the entire point of the patch.


\
 
 \ /
  Last update: 2014-07-17 03:41    [W:0.076 / U:1.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site